<template>
    <div>
        <div id="root">
            <div class="cb86951c chatai-container">
                <div class="cddfb2ed"></div>
                <div class="c3ecdb44">
                    <div class="dc04ec1d" :class="state.mobshowmenu?'mobshowmen':''" data-hidde="a02af2e6">
                        <div class="b8812f16 a2f3d50e">
                            <div class="ec92d1d3">
                                <div class="a5967822"></div>
                                <div class="e066abb8">
                                    <el-image style="max-width:203px;" :src="fullUrl(chatconfig.shop_logo)"/>
                                    <img v-if="false" src="@/assets/chat-shoplogo.png" style="max-width:203px;"/>
                                </div>
                            </div>
                            <div style="text-align: center;margin: 0 auto;">
                                <div style="height: 1px;background: #d0d8de;width: 203px;margin-bottom: 26px;"></div>
                            </div>
                            <div class="fb0a63fb " :class="chatconfig.applist.length>5?'fb0a63fb-min scrollable':''">
                                <div class="d4b5352e">
                                    <div class="f9edaa3c" v-for="(tabitem,ink) in chatconfig.applist" :key="ink"
                                         :class="sendinfo.appid==tabitem.appid?'b64fb9ae':''"
                                         @click="appChange(tabitem)">
                                        <div class="c08e6e93">
                                            <el-image :src="fullUrl(tabitem.image)" class="app-icon"/>
                                            <text class="apptext">{{ tabitem.title }}</text>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="b9cb4a74"></div>
                            <div class="_03210fb  scrollable">
                                <div class="_196bcac" v-if="false">
                                    <div class="_68953bc">
                                        <div class="ds-skeleton ds-skeleton--m ds-skeleton--text _5c2e5a9"><span
                                            aria-hidden="true">&nbsp;</span></div>
                                    </div>
                                    <div class="_68953bc">
                                        <div class="ds-skeleton ds-skeleton--m ds-skeleton--text _5c2e5a9"><span
                                            aria-hidden="true">&nbsp;</span></div>
                                    </div>
                                    <div class="_68953bc">
                                        <div class="ds-skeleton ds-skeleton--m ds-skeleton--text _5c2e5a9"><span
                                            aria-hidden="true">&nbsp;</span></div>
                                    </div>
                                    <div class="_68953bc">
                                        <div class="ds-skeleton ds-skeleton--m ds-skeleton--text _5c2e5a9"><span
                                            aria-hidden="true">&nbsp;</span></div>
                                    </div>
                                </div>
                                <div class="_77cdc67 _8a693f3">
                                    <div class="_5d4b535">
                                        <div class="_48cdfc1">对话</div>
                                        <div class="_83421f9 " :class="sendinfo.chatkey==chatcolumn.chatkey?'_83421f9-active':''" v-for="(chatcolumn,index) in chatconfig.chatdialog" :key="index"  @click="dropdownClick(chatcolumn)">
                                            <div class="c08e6e93">{{chatcolumn.title}}</div>
                                            <div class="_2090548" width="82" min-width="82">
                                                <el-popover   trigger="hover"
                                                    placement="right-start"
                                                    popper-class="chat-column-popover"
                                                    content="this is content, this is content, this is content"
                                                >
                                                    <template #reference>
                                                        <div class="ds-icon"
                                                             style="font-size: 16px; width: 16px; height: 16px;">
                                                            <svg xmlns="http://www.w3.org/2000/svg" fill="none"
                                                                 viewBox="0 0 24 24">
                                                                <path fill="currentColor" fill-rule="evenodd"
                                                                      d="M3 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0m7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0m7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0"
                                                                      clip-rule="evenodd"></path>
                                                            </svg>
                                                        </div>
                                                    </template>
                                                    <template #default>
                                                        <div class="chat-column-menu chat-title-edit" @click.stop="editTitle(chatcolumn)">
                                                            <svg width="24" height="24" viewBox="0 0 24 24" fill="none"
                                                                    xmlns="http://www.w3.org/2000/svg">
                                                                <path
                                                                    d="M20.2286 18.25H3.77142C3.34538 18.25 3 18.5954 3 19.0214C3 19.4475 3.34538 19.7928 3.77142 19.7928H20.2286C20.6546 19.7928 21 19.4475 21 19.0214C21 18.5954 20.6546 18.25 20.2286 18.25Z"
                                                                    fill="currentColor"></path>
                                                                <mask id="mask0_1954_727" maskUnits="userSpaceOnUse" x="3" y="2" width="15" height="15">
                                                                    <path d="M17.1429 2H3V16.1428H17.1429V2Z" fill="white"></path>
                                                                </mask>
                                                                <g mask="url(#mask0_1954_727)">
                                                                    <path
                                                                        d="M4.48999 16.14C4.36999 16.14 4.26002 16.12 4.15002 16.1C4.04002 16.07 3.94003 16.03 3.84003 15.98C3.73003 15.93 3.63999 15.88 3.54999 15.8C3.45999 15.73 3.39001 15.65 3.32001 15.56C3.25001 15.48 3.19001 15.38 3.14001 15.28C3.09001 15.18 3.05003 15.07 3.03003 14.96C3.01003 14.85 3 14.74 3 14.62C3 14.51 3.00998 14.4 3.03998 14.29L3.75 11.33C3.9 10.71 4.20001 10.18 4.64001 9.73L11.4 2.98C11.55 2.82 11.72 2.68 11.91 2.56C12.09 2.44 12.28 2.34 12.49 2.25C12.69 2.17 12.9 2.1 13.12 2.06C13.33 2.02 13.55 2 13.77 2C14 2 14.21 2.02 14.43 2.06C14.65 2.1 14.86 2.17 15.06 2.25C15.27 2.34 15.46 2.44 15.64 2.56C15.83 2.68 16 2.82 16.15 2.98C16.31 3.14 16.45 3.31001 16.57 3.49001C16.69 3.67001 16.79 3.87001 16.88 4.07001C16.96 4.27001 17.03 4.49 17.07 4.7C17.11 4.92 17.13 5.14 17.13 5.36C17.13 5.58 17.11 5.79999 17.07 6.00999C17.03 6.22999 16.96 6.44 16.88 6.64C16.79 6.85 16.69 7.04 16.57 7.22C16.45 7.41 16.31 7.58 16.15 7.73L9.40002 14.49C8.95002 14.94 8.42 15.23 7.81 15.38L4.84003 16.09C4.73003 16.12 4.60999 16.14 4.48999 16.14ZM13.67 3.63C13.22 3.66 12.84 3.84 12.52 4.16L5.78998 10.89C5.55998 11.12 5.41002 11.39 5.33002 11.71L4.66998 14.46L7.42999 13.8C7.73999 13.72 8.02 13.57 8.25 13.34L15 6.58C15.08 6.5 15.15 6.42001 15.22 6.32001C15.28 6.23001 15.33 6.13 15.38 6.02C15.42 5.92 15.45 5.81 15.47 5.7C15.5 5.58 15.51 5.47 15.51 5.36C15.51 5.24 15.5 5.13 15.47 5.02C15.45 4.91 15.42 4.8 15.38 4.69C15.33 4.59 15.28 4.49 15.22 4.39C15.15 4.3 15.08 4.21 15 4.13C14.82 3.96 14.62 3.82001 14.39 3.74001C14.16 3.65001 13.91 3.61 13.67 3.63Z"
                                                                        fill="currentColor"></path>
                                                                </g>
                                                            </svg>
                                                            编辑
                                                        </div>
                                                        <div style="background: rgb(234 235 235);width: 100%;margin: 5px 0;"></div>
                                                        <div class="chat-column-menu chat-title-delete" @click="deleteTitle(chatcolumn)">
                                                            <svg width="24" height="24" viewBox="0 0 24 24" fill="none"
                                                                      xmlns="http://www.w3.org/2000/svg">
                                                            <path fill-rule="evenodd" clip-rule="evenodd"
                                                                  d="M5.3948 8.24785C5.89262 8.21027 6.32593 8.58498 6.36058 9.083L6.91194 17.0084V17.0423C6.91194 18.562 8.1119 19.8099 9.60009 19.8099H14.4119C15.905 19.8099 17.1001 18.563 17.1001 17.0423V17.009L17.6407 9.08428C17.6747 8.58626 18.1074 8.21098 18.6053 8.24783C19.099 8.28438 19.4706 8.71284 19.4369 9.20682L18.9 17.0774C18.8817 19.6322 16.8736 21.6849 14.4119 21.6849H9.60009C7.14544 21.6849 5.13073 19.6335 5.11207 17.0781L4.56455 9.20795C4.53019 8.71406 4.90112 8.28511 5.3948 8.24785Z"
                                                                  fill="currentColor"></path>
                                                            <path fill-rule="evenodd" clip-rule="evenodd"
                                                                  d="M21 5.75C21 6.26777 20.5803 6.6875 20.0625 6.6875H3.9375C3.41973 6.6875 3 6.26777 3 5.75C3 5.23223 3.41973 4.8125 3.9375 4.8125H20.0625C20.5803 4.8125 21 5.23223 21 5.75Z"
                                                                  fill="currentColor"></path>
                                                            <path fill-rule="evenodd" clip-rule="evenodd"
                                                                  d="M10.2 10.75C10.6971 10.75 11.1 11.1529 11.1 11.65L11.1 16.1C11.1 16.5971 10.6971 17 10.2 17C9.70299 17 9.30005 16.5971 9.30005 16.1L9.30005 11.65C9.30005 11.1529 9.70299 10.75 10.2 10.75Z"
                                                                  fill="currentColor"></path>
                                                            <path fill-rule="evenodd" clip-rule="evenodd"
                                                                  d="M13.7999 10.75C14.297 10.75 14.6999 11.1529 14.6999 11.65L14.6999 16.1C14.6999 16.5971 14.297 17 13.7999 17C13.3028 17 12.8999 16.5971 12.8999 16.1L12.8999 11.65C12.8999 11.1529 13.3028 10.75 13.7999 10.75Z"
                                                                  fill="currentColor"></path>
                                                            <path fill-rule="evenodd" clip-rule="evenodd"
                                                                  d="M9.37093 2.87988C9.53733 2.5331 9.88788 2.3125 10.2725 2.3125H13.7269C14.1114 2.3125 14.462 2.53305 14.6284 2.87977L15.8048 5.33074L14.1949 6.16926L13.2436 4.1875H10.7558L9.80489 6.16916L8.19482 5.33084L9.37093 2.87988Z"
                                                                  fill="currentColor"></path>
                                                        </svg>
                                                            删除
                                                        </div>
                                                    </template>
                                                </el-popover>
                                            </div>
                                            <div class="_2f87737"></div>
                                            <div class="eaaaba55"></div>
                                        </div>
                                        <div class="b9cb4a74"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="c7f51894">
                                <div class="c6ab9234" style="padding: 5px 27px;" @click="goInstruct">
                                    <div class="ede5bc47">
                                        <div class="ds-icon f8ba2d00" style="width: 38px; height: 38px;">
                                            <img src="/assets/guidcat-icon.png"/>
                                        </div>
                                    </div>
                                    <div class="d65532b2" style="font-size: 15px;font-weight: normal;color: #2442bf;">
                                        使用指南
                                    </div>
                                </div>
                                <div class="c6ab9234" style="padding: 5px 27px;" @click="openFeedback">
                                    <div class="ede5bc47">
                                        <div class="ds-icon f8ba2d00" style="width: 38px; height: 38px;">
                                            <img src="/assets/feedback-icon.png"/>
                                        </div>
                                    </div>
                                    <div class="d65532b2" style="font-size: 15px;font-weight: normal;color: #2442bf;">
                                        问题反馈
                                    </div>
                                </div>
                                <div
                                    style="background: rgba(255, 255, 255, .4);width: 212px;height: 1px;margin-top: 10px"></div>
                                <div class="c6ab9234" @click="userAvatarHandle"
                                     style="height: 100px;padding-bottom: 15px;justify-content: center;">
                                    <div class="ede5bc47" style="width: 52px; height: 52px;">
                                        <div class="ds-icon f8ba2d00" style="width: 52px; height: 52px;">
                                            <img
                                                :src="userInfo.avatar?fullUrl(userInfo.avatar):fullUrl(state.defaultAvatar)">
                                        </div>
                                    </div>
                                    <div class="d65532b2">
                                        <div v-if="chatInfoObj.$state.loginset==3">免登陆</div>
                                        <div v-else>{{ userInfo.nickname ? userInfo.nickname : '请先登录' }}</div>
                                        <div class="free-tips">
                                            今日可咨询次数<span>{{ chatInfoObj.$state.free_count }}</span>/<span>{{
                                                chatInfoObj.$state.free_count > chatInfoObj.$state.usecount ? parseInt(chatInfoObj.$state.free_count - chatInfoObj.$state.usecount) : 0
                                            }}</span>次
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="cbcd962e " @click="showMenu"></div>
                    </div>
                    <div class="_4cbcd96 " @click="showMenu" :class="state.mobshowmenu?'':'_7d10bb1'"></div>
                    <div class="f2eea526">
                        <div class="a5cd95be">
                            <div class="be88ba8a">
                                <div class="f8d1e4c0">
                                    <div style="flex: 1 1 0%; min-width: 0px; display: flex; place-content: center; z-index: 12; margin-top: 10px;display: none;">
                                        <div class="d8ed659a" tabindex="0" style="outline: none;">
                                        </div>
                                    </div>
                                    <div class="b480065b"></div>
                                </div>
                                <div class="efe408db">
                                    <div @click="showMenu" class="ds-icon d7829b2f e7d8739b"
                                         style="font-size: 24px; width: 24px; height: 24px; color: rgb(139, 139, 139);">
                                        <svg width="28" height="28" viewBox="0 0 28 28" fill="none"
                                             xmlns="http://www.w3.org/2000/svg">
                                            <path
                                                d="M23.7222 4H4.27776C3.57207 4 3 4.57207 3 5.27776C3 5.98345 3.57207 6.55553 4.27776 6.55553H23.7222C24.4279 6.55553 25 5.98345 25 5.27776C25 4.57207 24.4279 4 23.7222 4Z"
                                                fill="currentColor"></path>
                                            <path
                                                d="M14.7593 12.8887H4.27776C3.57207 12.8887 3 13.4607 3 14.1664C3 14.8721 3.57207 15.4442 4.27776 15.4442H14.7593C15.465 15.4442 16.037 14.8721 16.037 14.1664C16.037 13.4607 15.465 12.8887 14.7593 12.8887Z"
                                                fill="currentColor"></path>
                                            <path
                                                d="M23.7222 21.7334H4.27776C3.57207 21.7334 3 22.3055 3 23.0112C3 23.7169 3.57207 24.2889 4.27776 24.2889H23.7222C24.4279 24.2889 25 23.7169 25 23.0112C25 22.3055 24.4279 21.7334 23.7222 21.7334Z"
                                                fill="currentColor"></path>
                                        </svg>
                                    </div>
                                    <div class="_3a24007"></div>
                                    <div v-if="false" class="ds-icon d7829b2f ecf90b28"
                                         style="font-size: 24px; width: 24px; height: 24px; color: rgb(139, 139, 139);">
                                        <svg width="28" height="28" viewBox="0 0 28 28" fill="none"
                                             xmlns="http://www.w3.org/2000/svg">
                                            <path
                                                d="M9.10999 27C8.92999 27 8.76001 26.96 8.60001 26.9C8.43001 26.83 8.29 26.74 8.16 26.61C8.03 26.49 7.94 26.3499 7.87 26.1899C7.79999 26.0299 7.76001 25.8599 7.76001 25.6899L7.73001 23.04C7.34001 22.98 6.95001 22.8799 6.57001 22.7599C6.19001 22.6299 5.83001 22.48 5.48001 22.29C5.13001 22.1 4.79999 21.88 4.48999 21.63C4.17999 21.39 3.89 21.1199 3.63 20.82C3.37 20.52 3.13999 20.21 2.92999 19.87C2.72999 19.53 2.56001 19.18 2.42001 18.82C2.28001 18.45 2.17001 18.07 2.10001 17.69C2.03001 17.3 2 16.92 2 16.53V9.46995C2 9.03995 2.04 8.61995 2.12 8.19995C2.21 7.77995 2.34 7.36995 2.5 6.96995C2.67 6.57995 2.88 6.19995 3.12 5.84995C3.36 5.48995 3.64001 5.15995 3.95001 4.85995C4.26001 4.55995 4.59999 4.28995 4.95999 4.04995C5.32999 3.80995 5.70999 3.60995 6.10999 3.44995C6.51999 3.27995 6.94 3.15995 7.37 3.07995C7.79999 2.98995 8.23001 2.94995 8.67001 2.94995H13.3C13.46 2.94995 13.61 2.97995 13.76 3.03995C13.9 3.09995 14.03 3.17995 14.14 3.28995C14.25 3.39995 14.33 3.51995 14.39 3.65995C14.45 3.79995 14.48 3.94995 14.48 4.09995C14.48 4.25995 14.45 4.39995 14.39 4.54995C14.33 4.68995 14.25 4.80995 14.14 4.91995C14.03 5.02995 13.9 5.10995 13.76 5.16995C13.61 5.22995 13.46 5.25995 13.3 5.25995H8.67001C8.38001 5.25995 8.09999 5.27995 7.82999 5.33995C7.54999 5.38995 7.27999 5.46995 7.01999 5.57995C6.75999 5.67995 6.50999 5.80995 6.26999 5.96995C6.03999 6.11995 5.82 6.29995 5.62 6.48995C5.42 6.68995 5.23999 6.89995 5.07999 7.12995C4.92999 7.35995 4.78999 7.59995 4.67999 7.85995C4.57999 8.10995 4.49 8.37995 4.44 8.64995C4.38 8.91995 4.35999 9.18995 4.35999 9.46995V16.53C4.35999 16.81 4.38 17.08 4.44 17.36C4.5 17.63 4.58 17.9 4.69 18.16C4.8 18.42 4.93 18.67 5.09 18.9C5.25 19.13 5.43001 19.3499 5.64001 19.5499C5.84001 19.75 6.05999 19.92 6.29999 20.08C6.53999 20.24 6.79 20.37 7.06 20.47C7.32 20.58 7.6 20.66 7.88 20.72C8.16001 20.77 8.44001 20.7999 8.73001 20.7999C8.91001 20.7999 9.08 20.83 9.25 20.9C9.41 20.97 9.55999 21.0599 9.67999 21.18C9.80999 21.3099 9.91001 21.45 9.98001 21.61C10.05 21.77 10.08 21.94 10.09 22.11L10.1 23.74L13.08 21.61C13.84 21.07 14.69 20.7999 15.63 20.7999H19.32C19.61 20.7999 19.89 20.77 20.16 20.72C20.44 20.67 20.71 20.59 20.97 20.4799C21.23 20.3699 21.48 20.24 21.72 20.09C21.95 19.94 22.17 19.76 22.37 19.57C22.57 19.3699 22.75 19.16 22.91 18.93C23.07 18.7 23.2 18.46 23.31 18.2C23.41 17.95 23.5 17.68 23.55 17.41C23.61 17.14 23.63 16.87 23.63 16.59V12.94C23.63 12.79 23.66 12.64 23.72 12.5C23.78 12.36 23.87 12.23 23.98 12.13C24.09 12.02 24.22 11.93 24.36 11.88C24.51 11.82 24.66 11.79 24.82 11.79C24.97 11.79 25.12 11.82 25.27 11.88C25.41 11.93 25.54 12.02 25.65 12.13C25.76 12.23 25.85 12.36 25.91 12.5C25.97 12.64 26 12.79 26 12.94V16.59C26 17.02 25.95 17.44 25.87 17.86C25.78 18.28 25.66 18.69 25.49 19.08C25.32 19.48 25.11 19.8499 24.87 20.2099C24.63 20.57 24.35 20.9 24.04 21.2C23.73 21.5 23.39 21.7699 23.03 22.0099C22.67 22.2499 22.28 22.45 21.88 22.61C21.47 22.77 21.06 22.9 20.63 22.9799C20.2 23.07 19.76 23.11 19.32 23.11H16.4C15.47 23.11 14.62 23.3799 13.86 23.9199L9.91 26.74C9.67 26.91 9.39999 27 9.10999 27Z"
                                                fill="currentColor"></path>
                                            <path
                                                d="M24.6805 5.14453H18.1874C17.5505 5.14453 17.0342 5.66086 17.0342 6.29778C17.0342 6.9347 17.5505 7.45102 18.1874 7.45102H24.6805C25.3175 7.45102 25.8338 6.9347 25.8338 6.29778C25.8338 5.66086 25.3175 5.14453 24.6805 5.14453Z"
                                                fill="currentColor"></path>
                                            <path
                                                d="M22.6137 3.1804C22.6137 2.52848 22.0852 2 21.4333 2C20.7814 2 20.2529 2.52848 20.2529 3.1804V9.4168C20.2529 10.0687 20.7814 10.5972 21.4333 10.5972C22.0852 10.5972 22.6137 10.0687 22.6137 9.4168V3.1804Z"
                                                fill="currentColor"></path>
                                        </svg>
                                    </div>
                                </div>
                            </div>
                            <div class="b83ee326">
                                <div class="f6004764" id="scrollRef" ref="scrollRef">
                                    <div class="f72b0bab">
                                        <div class="dad65929 welcome-mains">
                                            <div class="f9bf7997 d7dc56a8 c05b5566">
                                                <div class="eb23581b dfa60d66">
                                                    <el-image :size="30" style="width: 30px;height: 30px"
                                                              :src="fullUrl(state.activeApprow.image)"></el-image>
                                                </div>
                                                <div class="edb250b1" v-if="false">
                                                    <div class="a6d716f5 db5991dd">
                                                        <div class="ds-icon acbf4957"
                                                             style="font-size: 12px; width: 12px; height: 12px;">
                                                            <svg width="20" height="20" viewBox="0 0 20 20" fill="none"
                                                                 xmlns="http://www.w3.org/2000/svg">
                                                                <path
                                                                    d="M2.656 17.344c-1.016-1.015-1.15-2.75-.313-4.925.325-.825.73-1.617 1.205-2.365L3.582 10l-.033-.054c-.5-.799-.91-1.596-1.206-2.365-.836-2.175-.703-3.91.313-4.926.56-.56 1.364-.86 2.335-.86 1.425 0 3.168.636 4.957 1.756l.053.034.053-.034c1.79-1.12 3.532-1.757 4.957-1.757.972 0 1.776.3 2.335.86 1.014 1.015 1.148 2.752.312 4.926a13.892 13.892 0 0 1-1.206 2.365l-.034.054.034.053c.5.8.91 1.596 1.205 2.365.837 2.175.704 3.911-.311 4.926-.56.56-1.364.861-2.335.861-1.425 0-3.168-.637-4.957-1.757L10 16.415l-.053.033c-1.79 1.12-3.532 1.757-4.957 1.757-.972 0-1.776-.3-2.335-.86zm13.631-4.399c-.187-.488-.429-.988-.71-1.492l-.075-.132-.092.12a22.075 22.075 0 0 1-3.968 3.968l-.12.093.132.074c1.308.734 2.559 1.162 3.556 1.162.563 0 1.006-.138 1.298-.43.3-.3.436-.774.428-1.346-.008-.575-.159-1.264-.449-2.017zm-6.345 1.65l.058.042.058-.042a19.881 19.881 0 0 0 4.551-4.537l.043-.058-.043-.058a20.123 20.123 0 0 0-2.093-2.458 19.732 19.732 0 0 0-2.458-2.08L10 5.364l-.058.042A19.883 19.883 0 0 0 5.39 9.942L5.348 10l.042.059c.631.874 1.332 1.695 2.094 2.457a19.74 19.74 0 0 0 2.458 2.08zm6.366-10.902c-.293-.293-.736-.431-1.298-.431-.998 0-2.248.429-3.556 1.163l-.132.074.12.092a21.938 21.938 0 0 1 3.968 3.968l.092.12.074-.132c.282-.504.524-1.004.711-1.492.29-.753.442-1.442.45-2.017.007-.572-.129-1.045-.429-1.345zM3.712 7.055c.202.514.44 1.013.712 1.493l.074.13.092-.119a21.94 21.94 0 0 1 3.968-3.968l.12-.092-.132-.074C7.238 3.69 5.987 3.262 4.99 3.262c-.563 0-1.006.138-1.298.43-.3.301-.436.774-.428 1.346.007.575.159 1.264.448 2.017zm0 5.89c-.29.753-.44 1.442-.448 2.017-.008.572.127 1.045.428 1.345.293.293.736.431 1.298.431.997 0 2.247-.428 3.556-1.162l.131-.074-.12-.093a21.94 21.94 0 0 1-3.967-3.968l-.093-.12-.074.132a11.712 11.712 0 0 0-.71 1.492z"
                                                                    fill="currentColor" stroke="currentColor"
                                                                    stroke-width=".1"></path>
                                                                <path
                                                                    d="M10.706 11.704A1.843 1.843 0 0 1 8.155 10a1.845 1.845 0 1 1 2.551 1.704z"
                                                                    fill="currentColor" stroke="currentColor"
                                                                    stroke-width=".2"></path>
                                                            </svg>
                                                        </div>
                                                        已深度思考（用时 28 秒）
                                                        <el-icon class="is-loading" size="30" color="#2442BF">
                                                            <Loading/>
                                                        </el-icon>
                                                        <div class="ds-icon f4262477"
                                                             style="font-size: 10px; width: 10px; height: 10px; transform: rotate(0deg);">
                                                            <svg width="10" height="6" viewBox="0 0 10 6" fill="none"
                                                                 xmlns="http://www.w3.org/2000/svg">
                                                                <path
                                                                    d="M5.786 4.167L2.765 1.259c-.416-.4-.985-.482-1.273-.183-.287.298-.183.864.233 1.264l3.021 2.908c.416.4.986.482 1.273.184.287-.299.183-.865-.233-1.265z"
                                                                    fill="currentColor"></path>
                                                                <path
                                                                    d="M8.197 1.206L5.288 4.208c-.4.413-.484.982-.187 1.27.298.289.864.187 1.265-.227L9.274 2.25c.401-.414.485-.983.187-1.271-.297-.288-.863-.187-1.264.227z"
                                                                    fill="currentColor"></path>
                                                            </svg>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ds-markdown ds-markdown--block"
                                                     style="--ds-md-zoom: 1.143;">
                                                    <p>{{ chatconfig.welcome.title }}</p>
                                                    <p v-html="decodeHtmlEntities(chatconfig.welcome.describe)"></p>
                                                    <hr>
                                                    <div class="recommend-parts">
                                                        <div class="rec-title">
                                                            <div class="title-info">
                                                                <el-icon v-if="false">
                                                                    <ChatDotSquare/>
                                                                </el-icon>
                                                                你可以问我
                                                            </div>
                                                            <div class="title-info change-faqbtn"
                                                                 style="cursor: pointer; color:#2442bf;border: 1px solid #2442bf;padding: 2px;border-radius: 20px;font-size: 15px;    margin-left: 20px;background: #2442bf;
border-radius: 22px;
font-size: 12px;
font-family: '苹方 中等', '苹方', sans-serif, '苹方 中等', '苹方', sans-serif-400;
font-weight: normal;
color: #ffffff;    display: flex;align-items: center;justify-content: center;width: 78px;
height: 26px;"
                                                                 @click="keysChange"
                                                                 :disabled="chatconfig.welcome.faq_len<sendinfo.faq_num?true:false">
                                                                <el-icon>
                                                                    <Refresh/>
                                                                </el-icon>
                                                                换一换
                                                            </div>
                                                        </div>

                                                        <div v-if="!chatconfig.appfunIds.includes(1)"
                                                             style="font-size: 15px;color: #2442bf;text-align: right;    flex: 1;">
                                                            <a href="https://www.super-aiagent.com"
                                                                 style="color:#2442bf;    font-weight: 600;"
                                                                 title="超算智能体"
                                                                 target="_blank">{{chatconfig.technicalSupport}}</a>
                                                        </div>
                                                        <div class="rec-content">
                                                            <el-popover class="popover-main"
                                                                        v-for="(recitem,inx) in chatconfig.welcome.content"
                                                                        :key="inx"
                                                                        placement="bottom"
                                                                        :width="state.popoverWith"
                                                                        :title="recitem.title"
                                                                        trigger="hover"
                                                            >
                                                                <template #default>
                                                                    <div
                                                                        v-html="decodeHtmlEntities(recitem.describes)"></div>
                                                                </template>
                                                                <template #reference>
                                                                    <div class="content-info question-hover">
                                                                        <h3 class="quest-title">
                                                                            <a class="down-file"
                                                                               style="position: relative;"
                                                                               :download="fullUrl(recitem.file)"
                                                                               v-if="recitem.file&&chatconfig.appfunIds.includes(6)"
                                                                               :href="fullUrl(recitem.file)">
                                                                    <span
                                                                        style="color: #333333;font-size: 15px;cursor: pointer;">
                                                                        <img src="/assets/knowages_down.png"
                                                                             style="width: 20px;"/>
                                                                    </span>
                                                                            </a><span @click="questionClick(recitem)"> {{
                                                                                recitem.title
                                                                            }}</span>
                                                                            <!--                                            -->
                                                                        </h3>
                                                                        <p class="quest-desc"
                                                                           style="color: #333;margin: 3px;"
                                                                           @click="questionClick(recitem)"
                                                                           v-html="recitem.describes">
                                                                        </p>
                                                                    </div>
                                                                </template>
                                                            </el-popover>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="dad65929 chatscoroll">
                                            <template v-for="(chatitem,index) in chatconfig.chatList" :key="index">
                                                <div v-if="chatitem.type=='question'" class="fa81">

                                                    <el-input type="text" class="chatinput" style="border-radius: 20px;height: 60px;" v-if="chatitem.id==state.editingId" v-model="state.editingText" @blur="editTitleSave(chatitem)"
                                                              @keyup.enter="editTitleSave(chatitem)">
                                                    </el-input>
                                                    <div class="fbb737a4" v-else>
                                                        <div >{{ chatitem.question }}</div>
                                                        <div class="ds-flex e0558cb1"
                                                             style="position: absolute; right: calc(100% + 18px); top: 12px; gap: 12px;">
                                                            <div class="ds-icon-button" tabindex="1" @click="copyHandle(chatitem.editor,chatitem.id)"
                                                                 style="--ds-icon-button-text-color: #909090; --ds-icon-button-size: 20px;">
                                                                <div class="ds-icon"
                                                                     style="font-size: 20px; width: 20px; height: 20px;">
                                                                    <svg viewBox="0 0 20 20" fill="none"
                                                                         xmlns="http://www.w3.org/2000/svg"
                                                                         xmlns:xlink="http://www.w3.org/1999/xlink">
                                                                        <defs>
                                                                            <clipPath id="clip1248_20193">
                                                                                <rect id="鍥惧眰_1" width="17.052675"
                                                                                      height="17.052441"
                                                                                      transform="translate(1.000000 1.000000)"
                                                                                      fill="white"
                                                                                      fill-opacity="0"></rect>
                                                                            </clipPath>
                                                                            <clipPath id="clip1257_20794">
                                                                                <rect id="复制" width="20.000000"
                                                                                      height="20.000000"
                                                                                      fill="white"
                                                                                      fill-opacity="0"></rect>
                                                                            </clipPath>
                                                                        </defs>
                                                                        <g clip-path="url(#clip1257_20794)">
                                                                            <g clip-path="url(#clip1248_20193)">
                                                                                <path id="path"
                                                                                      d="M5.03 14.64C4.77 14.64 4.5 14.62 4.24 14.56C3.98 14.51 3.73 14.43 3.49 14.33C3.24 14.23 3.01 14.1 2.79 13.96C2.57 13.81 2.37 13.64 2.18 13.45C1.99 13.26 1.82 13.05 1.68 12.83C1.53 12.61 1.4 12.37 1.3 12.13C1.2 11.88 1.13 11.63 1.07 11.36C1.02 11.1 1 10.84 1 10.57L1 5.07C1 4.8 1.02 4.54 1.07 4.27C1.13 4.01 1.2 3.76 1.3 3.51C1.4 3.26 1.53 3.03 1.68 2.81C1.82 2.58 1.99 2.38 2.18 2.19C2.37 2 2.57 1.83 2.79 1.68C3.01 1.53 3.24 1.41 3.49 1.31C3.73 1.2 3.98 1.13 4.24 1.07C4.5 1.02 4.77 1 5.03 1L10.49 1C10.75 1 11.01 1.02 11.27 1.07C11.53 1.13 11.78 1.2 12.03 1.31C12.27 1.41 12.51 1.53 12.73 1.68C12.95 1.83 13.15 2 13.34 2.19C13.53 2.38 13.69 2.58 13.84 2.81C13.99 3.03 14.11 3.26 14.21 3.51C14.31 3.76 14.39 4.01 14.44 4.27C14.5 4.54 14.52 4.8 14.52 5.07L12.94 5.07C12.94 4.91 12.92 4.75 12.89 4.58C12.86 4.43 12.81 4.27 12.75 4.12C12.69 3.97 12.61 3.83 12.52 3.69C12.43 3.56 12.33 3.43 12.22 3.32C12.1 3.2 11.98 3.1 11.85 3.01C11.71 2.92 11.57 2.84 11.42 2.78C11.27 2.72 11.12 2.67 10.96 2.64C10.81 2.61 10.65 2.59 10.49 2.59L5.03 2.59C4.87 2.59 4.71 2.61 4.55 2.64C4.4 2.67 4.24 2.72 4.09 2.78C3.95 2.84 3.8 2.92 3.67 3.01C3.54 3.1 3.41 3.2 3.3 3.32C3.18 3.43 3.08 3.56 2.99 3.69C2.9 3.83 2.83 3.97 2.77 4.12C2.71 4.27 2.66 4.43 2.63 4.58C2.6 4.75 2.58 4.91 2.58 5.07L2.58 10.57C2.58 10.73 2.6 10.89 2.63 11.05C2.66 11.21 2.71 11.37 2.77 11.52C2.83 11.67 2.9 11.81 2.99 11.94C3.08 12.08 3.18 12.2 3.3 12.32C3.41 12.43 3.54 12.54 3.67 12.63C3.8 12.72 3.95 12.79 4.09 12.86C4.24 12.92 4.4 12.96 4.55 13C4.71 13.03 4.87 13.04 5.03 13.04L5.03 14.64Z"
                                                                                      fill="currentColor"
                                                                                      fill-opacity="1.000000"
                                                                                      fill-rule="evenodd"></path>
                                                                            </g>
                                                                            <path id="path"
                                                                                  d="M14.75 18.91L9.3 18.91C9.03 18.91 8.77 18.88 8.51 18.83C8.25 18.78 8 18.7 7.75 18.6C7.51 18.49 7.27 18.37 7.05 18.22C6.83 18.07 6.63 17.9 6.44 17.71C6.25 17.52 6.09 17.32 5.94 17.1C5.79 16.87 5.67 16.64 5.57 16.39C5.47 16.14 5.39 15.89 5.34 15.63C5.28 15.37 5.26 15.1 5.26 14.83L5.26 9.33C5.26 9.06 5.28 8.8 5.34 8.54C5.39 8.28 5.47 8.02 5.57 7.77C5.67 7.53 5.79 7.29 5.94 7.07C6.09 6.85 6.25 6.64 6.44 6.45C6.63 6.26 6.83 6.09 7.05 5.95C7.27 5.8 7.51 5.67 7.75 5.57C8 5.47 8.25 5.39 8.51 5.34C8.77 5.29 9.03 5.26 9.3 5.26L14.75 5.26C15.01 5.26 15.28 5.29 15.54 5.34C15.8 5.39 16.05 5.47 16.29 5.57C16.54 5.67 16.77 5.8 16.99 5.95C17.21 6.09 17.41 6.26 17.6 6.45C17.79 6.64 17.96 6.85 18.1 7.07C18.25 7.29 18.37 7.53 18.48 7.77C18.58 8.02 18.65 8.28 18.71 8.54C18.76 8.8 18.78 9.06 18.78 9.33L18.78 14.83C18.78 15.1 18.76 15.37 18.71 15.63C18.65 15.89 18.58 16.14 18.48 16.39C18.37 16.64 18.25 16.87 18.1 17.1C17.96 17.32 17.79 17.52 17.6 17.71C17.41 17.9 17.21 18.07 16.99 18.22C16.77 18.37 16.54 18.49 16.29 18.6C16.05 18.7 15.8 18.78 15.54 18.83C15.28 18.88 15.01 18.91 14.75 18.91ZM9.3 6.86C9.13 6.86 8.97 6.87 8.82 6.91C8.66 6.94 8.51 6.98 8.36 7.05C8.21 7.11 8.07 7.18 7.93 7.28C7.8 7.37 7.68 7.47 7.56 7.58C7.45 7.7 7.35 7.82 7.26 7.96C7.17 8.09 7.09 8.24 7.03 8.38C6.97 8.54 6.92 8.69 6.89 8.85C6.86 9.01 6.84 9.17 6.84 9.33L6.84 14.83C6.84 15 6.86 15.16 6.89 15.32C6.92 15.48 6.97 15.63 7.03 15.78C7.09 15.93 7.17 16.07 7.26 16.21C7.35 16.34 7.45 16.47 7.56 16.58C7.68 16.7 7.8 16.8 7.93 16.89C8.07 16.98 8.21 17.06 8.36 17.12C8.51 17.18 8.66 17.23 8.82 17.26C8.97 17.29 9.13 17.31 9.3 17.31L14.75 17.31C14.91 17.31 15.07 17.29 15.23 17.26C15.38 17.23 15.54 17.18 15.69 17.12C15.83 17.06 15.98 16.98 16.11 16.89C16.24 16.8 16.37 16.7 16.48 16.58C16.59 16.47 16.7 16.34 16.79 16.21C16.87 16.07 16.95 15.93 17.01 15.78C17.07 15.63 17.12 15.48 17.15 15.32C17.18 15.16 17.2 15 17.2 14.83L17.2 9.33C17.2 9.17 17.18 9.01 17.15 8.85C17.12 8.69 17.07 8.54 17.01 8.38C16.95 8.24 16.87 8.09 16.79 7.96C16.7 7.82 16.59 7.7 16.48 7.58C16.37 7.47 16.24 7.37 16.11 7.28C15.98 7.19 15.83 7.11 15.69 7.05C15.54 6.98 15.38 6.94 15.23 6.91C15.07 6.87 14.91 6.86 14.75 6.86L9.3 6.86Z"
                                                                                  fill="currentColor"
                                                                                  fill-opacity="1.000000"
                                                                                  fill-rule="nonzero"></path>
                                                                        </g>
                                                                    </svg>
                                                                </div>
                                                            </div>
                                                            <div class="ds-icon-button" tabindex="0" @click="upchatQuestion(chatitem)"
                                                                 style="--ds-icon-button-text-color: #909090; --ds-icon-button-size: 20px;">
                                                                <div class="ds-icon"
                                                                     style="font-size: 20px; width: 20px; height: 20px;">
                                                                    <svg width="20" height="20" viewBox="0 0 20 20"
                                                                         fill="none"
                                                                         xmlns="http://www.w3.org/2000/svg">
                                                                        <path
                                                                            d="M18.2286 17.3545H1.77142C1.34538 17.3545 1 17.6999 1 18.1259C1 18.552 1.34538 18.8973 1.77142 18.8973H18.2286C18.6546 18.8973 19 18.552 19 18.1259C19 17.6999 18.6546 17.3545 18.2286 17.3545Z"
                                                                            fill="currentColor"></path>
                                                                        <mask id="mask0_400_418"
                                                                              maskUnits="userSpaceOnUse"
                                                                              x="1"
                                                                              y="1" width="15" height="15">
                                                                            <path
                                                                                d="M15.1429 1.10254H1V15.2454H15.1429V1.10254Z"
                                                                                fill="white"></path>
                                                                        </mask>
                                                                        <g mask="url(#mask0_400_418)">
                                                                            <path
                                                                                d="M2.48999 15.2425C2.36999 15.2425 2.26002 15.2225 2.15002 15.2025C2.04002 15.1725 1.94003 15.1325 1.84003 15.0825C1.73003 15.0325 1.63999 14.9825 1.54999 14.9025C1.45999 14.8325 1.39001 14.7525 1.32001 14.6625C1.25001 14.5825 1.19001 14.4825 1.14001 14.3825C1.09001 14.2825 1.05003 14.1725 1.03003 14.0625C1.01003 13.9525 1 13.8425 1 13.7225C1 13.6125 1.00998 13.5025 1.03998 13.3925L1.75 10.4325C1.9 9.81254 2.20001 9.28253 2.64001 8.83253L9.40002 2.08253C9.55002 1.92253 9.71997 1.78254 9.90997 1.66254C10.09 1.54254 10.28 1.44254 10.49 1.35254C10.69 1.27254 10.9 1.20254 11.12 1.16254C11.33 1.12254 11.55 1.10254 11.77 1.10254C12 1.10254 12.21 1.12254 12.43 1.16254C12.65 1.20254 12.86 1.27254 13.06 1.35254C13.27 1.44254 13.46 1.54254 13.64 1.66254C13.83 1.78254 14 1.92253 14.15 2.08253C14.31 2.24253 14.45 2.41254 14.57 2.59254C14.69 2.77254 14.79 2.97255 14.88 3.17255C14.96 3.37255 15.03 3.59254 15.07 3.80254C15.11 4.02254 15.13 4.24254 15.13 4.46254C15.13 4.68254 15.11 4.90253 15.07 5.11253C15.03 5.33253 14.96 5.54254 14.88 5.74254C14.79 5.95254 14.69 6.14254 14.57 6.32254C14.45 6.51254 14.31 6.68253 14.15 6.83253L7.40002 13.5925C6.95002 14.0425 6.42 14.3325 5.81 14.4825L2.84003 15.1925C2.73003 15.2225 2.60999 15.2425 2.48999 15.2425ZM11.67 2.73254C11.22 2.76254 10.84 2.94254 10.52 3.26254L3.78998 9.99254C3.55998 10.2225 3.41002 10.4925 3.33002 10.8125L2.66998 13.5625L5.42999 12.9025C5.73999 12.8225 6.02 12.6725 6.25 12.4425L13 5.68254C13.08 5.60254 13.15 5.52255 13.22 5.42255C13.28 5.33255 13.33 5.23254 13.38 5.12254C13.42 5.02254 13.45 4.91254 13.47 4.80254C13.5 4.68254 13.51 4.57254 13.51 4.46254C13.51 4.34254 13.5 4.23254 13.47 4.12254C13.45 4.01254 13.42 3.90254 13.38 3.79254C13.33 3.69254 13.28 3.59254 13.22 3.49254C13.15 3.40254 13.08 3.31254 13 3.23254C12.82 3.06254 12.62 2.92254 12.39 2.84254C12.16 2.75254 11.91 2.71254 11.67 2.73254Z"
                                                                                fill="currentColor"></path>
                                                                        </g>
                                                                    </svg>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div v-if="chatitem.type=='answer'" class="f9bf7997 d7dc56a8 c05b5566">
                                                    <div class="eb23581b dfa60d66">
                                                        <el-image :size="30" style="width: 30px;height: 30px"
                                                                  :src="fullUrl(state.activeApprow.image)"></el-image>
                                                    </div>
                                                    <div class="ds-markdown ds-markdown--block"
                                                         style="--ds-md-zoom: 1.143;"
                                                         v-if="chating&&(((index+1)==chatconfig.chatList.length)?true:false)">
                                                        <div v-html="md.render(state.markdownText)">
                                                        </div>
                                                        <el-icon v-if="state.mdLoading" class="is-loading" size="20" color="#2442BF">
                                                            <Loading />
                                                        </el-icon>
                                                    </div>
                                                    <div v-else class="ds-markdown ds-markdown--block">
                                                        <div v-html="md.render(chatitem.answer)">
                                                        </div>
                                                    </div>
                                                    <div class="answer-source"  v-if="chatconfig.appfunIds.includes(14)&&chatitem.source&&chatitem.source.length>0">
                                                        <p class="answer-title">
                                                            回答来源({{ chatitem.source.length }})</p>
                                                        <div style="line-height: 20px;margin-top: 7px;">
                                                            <p
                                                                @click="viewSlice(sourfile)"
                                                                v-for="(sourfile,ink) in chatitem.source"
                                                                :key="ink" class="source-file">
                                                                <span style="display: flex;align-items: center;">
                                                                   {{ ink + 1 }}、<el-icon size="16"  style="margin-right: 14.74px"><Link/></el-icon>
                                                                   {{ sourfile.name }}
                                                                </span>
                                                            </p>
                                                        </div>
                                                    </div>
                                                    <hr style="border: none;height: 2px;background: rgba(36,66,191,0.06);">
                                                    <div class="ds-flex"
                                                         style="margin-top: 12px; height: 20px; align-items: center; gap: 12px;">
                                                        <div class="ds-flex abe97156" style="align-items: center; gap: 12px;">
                                                            <div class="ds-icon-button mesback-btn" tabindex="0"
                                                                 @click="Regenerate(chatitem.question,chatitem.id)">
                                                                <div class="ds-icon"
                                                                     style="font-size: 20px; width: 20px; height: 20px;">
                                                                    <svg viewBox="0 0 20 20" fill="none"
                                                                         xmlns="http://www.w3.org/2000/svg"
                                                                         xmlns:xlink="http://www.w3.org/1999/xlink">
                                                                        <defs>
                                                                            <clipPath id="clip1258_20811">
                                                                                <rect id="重新生成" width="20.000000"
                                                                                      height="20.000000" fill="white"
                                                                                      fill-opacity="0"></rect>
                                                                            </clipPath>
                                                                        </defs>
                                                                        <rect id="重新生成" width="20.000000"
                                                                              height="20.000000"
                                                                              fill="#FFFFFF" fill-opacity="0"></rect>
                                                                        <g clip-path="url(#clip1258_20811)">
                                                                            <path id="path"
                                                                                  d="M17.01 7.63L13.98 7.62C13.88 7.62 13.79 7.6 13.7 7.56C13.62 7.52 13.54 7.47 13.47 7.4C13.4 7.33 13.35 7.25 13.32 7.16C13.28 7.07 13.26 6.98 13.26 6.88C13.26 6.79 13.28 6.69 13.32 6.6C13.35 6.51 13.4 6.43 13.47 6.36C13.54 6.3 13.62 6.24 13.7 6.21C13.79 6.17 13.88 6.15 13.98 6.15L15.57 6.16C15.67 6.16 15.76 6.14 15.85 6.1C15.94 6.06 16.01 6.01 16.08 5.94C16.15 5.87 16.2 5.79 16.23 5.7C16.27 5.61 16.29 5.52 16.29 5.42L16.3 3.89C16.3 3.79 16.32 3.7 16.36 3.61C16.39 3.52 16.44 3.44 16.51 3.37C16.58 3.3 16.66 3.25 16.74 3.21C16.83 3.17 16.92 3.16 17.02 3.16C17.11 3.16 17.2 3.17 17.29 3.21C17.38 3.25 17.46 3.3 17.52 3.37C17.59 3.44 17.64 3.52 17.68 3.61C17.71 3.7 17.73 3.79 17.73 3.89L17.72 6.9C17.72 7 17.71 7.09 17.67 7.18C17.63 7.27 17.58 7.34 17.52 7.41C17.45 7.48 17.37 7.53 17.29 7.57C17.2 7.61 17.11 7.63 17.01 7.63Z"
                                                                                  fill="currentColor"
                                                                                  fill-opacity="1.000000"
                                                                                  fill-rule="nonzero"></path>
                                                                            <path id="path"
                                                                                  d="M2.31 16.29L2.32 13.3C2.32 13.21 2.34 13.11 2.37 13.02C2.41 12.93 2.46 12.85 2.53 12.78C2.6 12.71 2.67 12.66 2.76 12.62C2.85 12.58 2.94 12.56 3.03 12.56L6.07 12.57C6.16 12.57 6.25 12.59 6.34 12.63C6.43 12.67 6.51 12.72 6.57 12.79C6.64 12.86 6.69 12.94 6.73 13.03C6.76 13.12 6.78 13.22 6.78 13.32C6.78 13.41 6.76 13.51 6.73 13.6C6.69 13.69 6.64 13.77 6.57 13.84C6.51 13.91 6.43 13.96 6.34 14C6.25 14.04 6.16 14.06 6.07 14.06L4.47 14.05C4.38 14.05 4.29 14.07 4.2 14.11C4.11 14.15 4.03 14.2 3.97 14.27C3.9 14.34 3.85 14.42 3.81 14.51C3.78 14.6 3.76 14.7 3.76 14.8L3.75 16.29C3.75 16.39 3.73 16.48 3.69 16.58C3.65 16.67 3.6 16.75 3.54 16.82C3.47 16.89 3.39 16.94 3.3 16.98C3.22 17.01 3.13 17.03 3.03 17.03C2.94 17.03 2.85 17.02 2.76 16.98C2.67 16.94 2.59 16.89 2.52 16.82C2.46 16.75 2.4 16.67 2.37 16.58C2.33 16.49 2.31 16.39 2.31 16.29Z"
                                                                                  fill="currentColor"
                                                                                  fill-opacity="1.000000"
                                                                                  fill-rule="nonzero"></path>
                                                                            <path id="path"
                                                                                  d="M9.88 18.01C9.51 18.01 9.15 17.99 8.79 17.94C8.42 17.89 8.07 17.82 7.71 17.73C7.36 17.63 7.02 17.51 6.68 17.37C6.34 17.23 6.02 17.07 5.7 16.89C5.39 16.7 5.09 16.5 4.8 16.28C4.52 16.05 4.25 15.81 3.99 15.55C3.74 15.29 3.5 15.02 3.29 14.73C3.07 14.44 2.88 14.13 2.7 13.82L4.15 13.05C4.32 13.35 4.51 13.64 4.72 13.91C4.93 14.18 5.17 14.43 5.42 14.66C5.67 14.9 5.94 15.11 6.23 15.3C6.52 15.49 6.83 15.66 7.14 15.81C7.46 15.95 7.78 16.07 8.12 16.16C8.45 16.25 8.8 16.32 9.14 16.36C9.49 16.39 9.83 16.4 10.18 16.39C10.53 16.37 10.87 16.33 11.22 16.26C11.56 16.19 11.89 16.09 12.21 15.97C12.54 15.84 12.85 15.7 13.15 15.53C13.45 15.35 13.74 15.16 14.01 14.94C14.28 14.72 14.53 14.49 14.76 14.23C14.99 13.97 15.2 13.7 15.38 13.41C15.57 13.12 15.73 12.82 15.87 12.5C16 12.19 16.11 11.87 16.2 11.53C16.28 11.2 16.34 10.87 16.36 10.52C16.37 10.42 16.4 10.33 16.44 10.24C16.48 10.15 16.54 10.07 16.61 10C16.69 9.93 16.77 9.87 16.86 9.84C16.96 9.8 17.05 9.77 17.16 9.77C17.27 9.77 17.38 9.79 17.49 9.83C17.6 9.87 17.7 9.94 17.78 10.02C17.86 10.1 17.92 10.2 17.96 10.3C18 10.41 18.01 10.52 18 10.64C17.98 10.89 17.95 11.13 17.91 11.38C17.86 11.62 17.81 11.87 17.74 12.11C17.68 12.35 17.6 12.58 17.51 12.82C17.42 13.05 17.32 13.28 17.21 13.5C17.1 13.73 16.98 13.95 16.85 14.16C16.71 14.37 16.57 14.58 16.42 14.78C16.27 14.98 16.11 15.17 15.94 15.36C15.77 15.54 15.59 15.72 15.41 15.89C15.22 16.06 15.03 16.22 14.83 16.37C14.63 16.52 14.42 16.66 14.2 16.79C13.99 16.93 13.77 17.05 13.54 17.16C13.31 17.27 13.08 17.37 12.85 17.46C12.61 17.55 12.37 17.63 12.13 17.7C11.88 17.77 11.64 17.83 11.39 17.87C11.14 17.92 10.89 17.96 10.63 17.98C10.38 18 10.13 18.01 9.88 18.01Z"
                                                                                  fill="currentColor"
                                                                                  fill-opacity="1.000000"
                                                                                  fill-rule="nonzero"></path>
                                                                            <path id="path"
                                                                                  d="M2.85 10.27C2.73 10.28 2.62 10.26 2.51 10.22C2.4 10.17 2.31 10.11 2.23 10.03C2.14 9.95 2.08 9.85 2.04 9.74C2 9.63 1.99 9.52 2 9.41C2.03 8.98 2.1 8.56 2.2 8.15C2.3 7.73 2.43 7.33 2.6 6.94C2.76 6.54 2.96 6.16 3.19 5.8C3.41 5.44 3.67 5.1 3.95 4.77C4.24 4.45 4.54 4.15 4.88 3.88C5.21 3.6 5.56 3.35 5.93 3.13C6.3 2.91 6.69 2.73 7.09 2.57C7.5 2.41 7.91 2.28 8.33 2.19C8.75 2.09 9.18 2.03 9.62 2.01C10.05 1.98 10.48 1.99 10.91 2.03C11.35 2.07 11.77 2.14 12.19 2.25C12.61 2.36 13.02 2.5 13.42 2.67C13.81 2.84 14.19 3.04 14.56 3.28C14.92 3.51 15.27 3.77 15.59 4.05C15.91 4.34 16.21 4.64 16.48 4.98C16.75 5.31 17 5.66 17.21 6.03L15.78 6.83C15.61 6.54 15.42 6.25 15.2 5.99C14.98 5.73 14.74 5.48 14.49 5.25C14.23 5.02 13.96 4.82 13.66 4.63C13.37 4.45 13.07 4.29 12.75 4.15C12.44 4.01 12.11 3.9 11.77 3.82C11.44 3.73 11.1 3.67 10.76 3.64C10.41 3.61 10.07 3.6 9.72 3.62C9.37 3.64 9.03 3.69 8.69 3.77C8.36 3.84 8.03 3.94 7.71 4.07C7.38 4.2 7.08 4.35 6.78 4.52C6.48 4.7 6.2 4.89 5.94 5.11C5.67 5.33 5.43 5.57 5.2 5.83C4.97 6.08 4.77 6.36 4.59 6.65C4.41 6.94 4.25 7.24 4.12 7.55C3.98 7.87 3.88 8.19 3.8 8.52C3.72 8.85 3.66 9.19 3.64 9.53C3.63 9.62 3.6 9.72 3.56 9.81C3.52 9.9 3.46 9.98 3.39 10.05C3.32 10.12 3.23 10.17 3.14 10.21C3.05 10.25 2.95 10.27 2.85 10.27Z"
                                                                                  fill="currentColor"
                                                                                  fill-opacity="1.000000"
                                                                                  fill-rule="nonzero"></path>
                                                                        </g>
                                                                    </svg>
                                                                </div>
                                                                <span> 重新生成</span>
                                                            </div>
                                                            <div class="ds-icon-button mesback-btn" tabindex="0"
                                                                 @click="copyHandle(chatitem.editor,chatitem.id)">
                                                                <div class="ds-icon"
                                                                     style="font-size: 20px; width: 20px; height: 20px;">
                                                                    <svg viewBox="0 0 20 20" fill="none"
                                                                         xmlns="http://www.w3.org/2000/svg"
                                                                         xmlns:xlink="http://www.w3.org/1999/xlink">
                                                                        <defs>
                                                                            <clipPath id="clip1248_20193">
                                                                                <rect id="鍥惧眰_1" width="17.052675"
                                                                                      height="17.052441"
                                                                                      transform="translate(1.000000 1.000000)"
                                                                                      fill="white"
                                                                                      fill-opacity="0"></rect>
                                                                            </clipPath>
                                                                            <clipPath id="clip1257_20794">
                                                                                <rect id="复制" width="20.000000"
                                                                                      height="20.000000"
                                                                                      fill="white"
                                                                                      fill-opacity="0"></rect>
                                                                            </clipPath>
                                                                        </defs>
                                                                        <g clip-path="url(#clip1257_20794)">
                                                                            <g clip-path="url(#clip1248_20193)">
                                                                                <path id="path"
                                                                                      d="M5.03 14.64C4.77 14.64 4.5 14.62 4.24 14.56C3.98 14.51 3.73 14.43 3.49 14.33C3.24 14.23 3.01 14.1 2.79 13.96C2.57 13.81 2.37 13.64 2.18 13.45C1.99 13.26 1.82 13.05 1.68 12.83C1.53 12.61 1.4 12.37 1.3 12.13C1.2 11.88 1.13 11.63 1.07 11.36C1.02 11.1 1 10.84 1 10.57L1 5.07C1 4.8 1.02 4.54 1.07 4.27C1.13 4.01 1.2 3.76 1.3 3.51C1.4 3.26 1.53 3.03 1.68 2.81C1.82 2.58 1.99 2.38 2.18 2.19C2.37 2 2.57 1.83 2.79 1.68C3.01 1.53 3.24 1.41 3.49 1.31C3.73 1.2 3.98 1.13 4.24 1.07C4.5 1.02 4.77 1 5.03 1L10.49 1C10.75 1 11.01 1.02 11.27 1.07C11.53 1.13 11.78 1.2 12.03 1.31C12.27 1.41 12.51 1.53 12.73 1.68C12.95 1.83 13.15 2 13.34 2.19C13.53 2.38 13.69 2.58 13.84 2.81C13.99 3.03 14.11 3.26 14.21 3.51C14.31 3.76 14.39 4.01 14.44 4.27C14.5 4.54 14.52 4.8 14.52 5.07L12.94 5.07C12.94 4.91 12.92 4.75 12.89 4.58C12.86 4.43 12.81 4.27 12.75 4.12C12.69 3.97 12.61 3.83 12.52 3.69C12.43 3.56 12.33 3.43 12.22 3.32C12.1 3.2 11.98 3.1 11.85 3.01C11.71 2.92 11.57 2.84 11.42 2.78C11.27 2.72 11.12 2.67 10.96 2.64C10.81 2.61 10.65 2.59 10.49 2.59L5.03 2.59C4.87 2.59 4.71 2.61 4.55 2.64C4.4 2.67 4.24 2.72 4.09 2.78C3.95 2.84 3.8 2.92 3.67 3.01C3.54 3.1 3.41 3.2 3.3 3.32C3.18 3.43 3.08 3.56 2.99 3.69C2.9 3.83 2.83 3.97 2.77 4.12C2.71 4.27 2.66 4.43 2.63 4.58C2.6 4.75 2.58 4.91 2.58 5.07L2.58 10.57C2.58 10.73 2.6 10.89 2.63 11.05C2.66 11.21 2.71 11.37 2.77 11.52C2.83 11.67 2.9 11.81 2.99 11.94C3.08 12.08 3.18 12.2 3.3 12.32C3.41 12.43 3.54 12.54 3.67 12.63C3.8 12.72 3.95 12.79 4.09 12.86C4.24 12.92 4.4 12.96 4.55 13C4.71 13.03 4.87 13.04 5.03 13.04L5.03 14.64Z"
                                                                                      fill="currentColor"
                                                                                      fill-opacity="1.000000"
                                                                                      fill-rule="evenodd"></path>
                                                                            </g>
                                                                            <path id="path"
                                                                                  d="M14.75 18.91L9.3 18.91C9.03 18.91 8.77 18.88 8.51 18.83C8.25 18.78 8 18.7 7.75 18.6C7.51 18.49 7.27 18.37 7.05 18.22C6.83 18.07 6.63 17.9 6.44 17.71C6.25 17.52 6.09 17.32 5.94 17.1C5.79 16.87 5.67 16.64 5.57 16.39C5.47 16.14 5.39 15.89 5.34 15.63C5.28 15.37 5.26 15.1 5.26 14.83L5.26 9.33C5.26 9.06 5.28 8.8 5.34 8.54C5.39 8.28 5.47 8.02 5.57 7.77C5.67 7.53 5.79 7.29 5.94 7.07C6.09 6.85 6.25 6.64 6.44 6.45C6.63 6.26 6.83 6.09 7.05 5.95C7.27 5.8 7.51 5.67 7.75 5.57C8 5.47 8.25 5.39 8.51 5.34C8.77 5.29 9.03 5.26 9.3 5.26L14.75 5.26C15.01 5.26 15.28 5.29 15.54 5.34C15.8 5.39 16.05 5.47 16.29 5.57C16.54 5.67 16.77 5.8 16.99 5.95C17.21 6.09 17.41 6.26 17.6 6.45C17.79 6.64 17.96 6.85 18.1 7.07C18.25 7.29 18.37 7.53 18.48 7.77C18.58 8.02 18.65 8.28 18.71 8.54C18.76 8.8 18.78 9.06 18.78 9.33L18.78 14.83C18.78 15.1 18.76 15.37 18.71 15.63C18.65 15.89 18.58 16.14 18.48 16.39C18.37 16.64 18.25 16.87 18.1 17.1C17.96 17.32 17.79 17.52 17.6 17.71C17.41 17.9 17.21 18.07 16.99 18.22C16.77 18.37 16.54 18.49 16.29 18.6C16.05 18.7 15.8 18.78 15.54 18.83C15.28 18.88 15.01 18.91 14.75 18.91ZM9.3 6.86C9.13 6.86 8.97 6.87 8.82 6.91C8.66 6.94 8.51 6.98 8.36 7.05C8.21 7.11 8.07 7.18 7.93 7.28C7.8 7.37 7.68 7.47 7.56 7.58C7.45 7.7 7.35 7.82 7.26 7.96C7.17 8.09 7.09 8.24 7.03 8.38C6.97 8.54 6.92 8.69 6.89 8.85C6.86 9.01 6.84 9.17 6.84 9.33L6.84 14.83C6.84 15 6.86 15.16 6.89 15.32C6.92 15.48 6.97 15.63 7.03 15.78C7.09 15.93 7.17 16.07 7.26 16.21C7.35 16.34 7.45 16.47 7.56 16.58C7.68 16.7 7.8 16.8 7.93 16.89C8.07 16.98 8.21 17.06 8.36 17.12C8.51 17.18 8.66 17.23 8.82 17.26C8.97 17.29 9.13 17.31 9.3 17.31L14.75 17.31C14.91 17.31 15.07 17.29 15.23 17.26C15.38 17.23 15.54 17.18 15.69 17.12C15.83 17.06 15.98 16.98 16.11 16.89C16.24 16.8 16.37 16.7 16.48 16.58C16.59 16.47 16.7 16.34 16.79 16.21C16.87 16.07 16.95 15.93 17.01 15.78C17.07 15.63 17.12 15.48 17.15 15.32C17.18 15.16 17.2 15 17.2 14.83L17.2 9.33C17.2 9.17 17.18 9.01 17.15 8.85C17.12 8.69 17.07 8.54 17.01 8.38C16.95 8.24 16.87 8.09 16.79 7.96C16.7 7.82 16.59 7.7 16.48 7.58C16.37 7.47 16.24 7.37 16.11 7.28C15.98 7.19 15.83 7.11 15.69 7.05C15.54 6.98 15.38 6.94 15.23 6.91C15.07 6.87 14.91 6.86 14.75 6.86L9.3 6.86Z"
                                                                                  fill="currentColor"
                                                                                  fill-opacity="1.000000"
                                                                                  fill-rule="nonzero"></path>
                                                                        </g>
                                                                    </svg>
                                                                </div>
                                                                <span>复制</span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </template>
                                            <div class="f9bf7997 d7dc56a8 c05b5566"
                                                 v-if="chatconfig.chaterror||sendLoading">
                                                <div class="eb23581b dfa60d66">
                                                    <el-image :size="30" style="width: 30px;height: 30px"
                                                              :src="fullUrl(state.activeApprow.image)"></el-image>
                                                </div>
                                                <div class="edb250b1" v-if="sendLoading">
                                                    <div class="a6d716f5 db5991dd think-loading">
                                                        思考中......
                                                        <el-icon class="is-loading" size="20" color="#2442BF">
                                                            <Loading/>
                                                        </el-icon>
                                                        <div class="ds-icon f4262477" v-if="false"
                                                             style="font-size: 10px; width: 10px; height: 10px; transform: rotate(0deg);">
                                                            <svg width="10" height="6" viewBox="0 0 10 6" fill="none"
                                                                 xmlns="http://www.w3.org/2000/svg">
                                                                <path
                                                                    d="M5.786 4.167L2.765 1.259c-.416-.4-.985-.482-1.273-.183-.287.298-.183.864.233 1.264l3.021 2.908c.416.4.986.482 1.273.184.287-.299.183-.865-.233-1.265z"
                                                                    fill="currentColor"></path>
                                                                <path
                                                                    d="M8.197 1.206L5.288 4.208c-.4.413-.484.982-.187 1.27.298.289.864.187 1.265-.227L9.274 2.25c.401-.414.485-.983.187-1.271-.297-.288-.863-.187-1.264.227z"
                                                                    fill="currentColor"></path>
                                                            </svg>
                                                        </div>
                                                    </div>
                                                    <div class="e1675d8b" v-if="false">
                                                        <div class="ecc93a3b"></div>
                                                        <p class="ba94db8a">
                                                            好的，用户这次发来的是“asfsf”，看起来像是一堆随机字母，没有实际意义。这可能是个打字错误或者误发。我需要先确认用户的意图。</p>
                                                        <p class="ba94db8a"></p>
                                                    </div>
                                                </div>
                                                <div class="edb250b1">
                                                    <div class="a6d716f5 db5991dd think-error"
                                                         v-if="chatconfig.chaterror">
                                                        {{ chatconfig.chatmsg }}
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="cbcaa82c">
                                <div class="upfile-res" v-if="chatconfig.chatfile.name">
                                    {{ chatconfig.chatfile.name }}
                                    <el-icon :size="17" style="margin-left: 15px;" @click="clearChatfile">
                                        <Delete/>
                                    </el-icon>
                                </div>
                                <div class="aaff8b8f">
                                    <div class="cefa5c26">
                                        <div class="dd442025 b699646e" style="background: rgba(36, 66, 191, 0.05);">
                                            <div class="fad49dec">
                                                        <textarea id="chat-input" ref="inputpcFocus"
                                                                  @keyup.ctrl.enter="lineBreak"
                                                                  @keydown.enter.exact="sendQuestion"
                                                                  v-model="sendinfo.question" class="c92459f0"
                                                                  placeholder="输入要问的问题"
                                                                  rows="2"></textarea>
                                                <div class="b13855df"></div>
                                            </div>
                                            <div class="ec4f5d61">
                                                <chatupload v-if="chatconfig.appfunIds.includes(12)" :data="{chatkey:sendinfo.chatkey,app_id:sendinfo.appid,'driver':'local'}"
                                                            @success="chatFileSusccess"
                                                            @change="onElChange('file',$event)"
                                                            type="file">
                                                    <template #default>
                                                        <div role="button"
                                                             :class="chatconfig.chatfile.name?'chatup-button-dis':''"
                                                             class=" chatup-button ds-button ds-button--primary ds-button--filled ds-button--rect ds-button--m d9f56c96"
                                                             tabindex="0"
                                                             style="--ds-button-color: #DBEAFE; --button-text-color: #4D6BFE; --button-border-color: rgba(0, 122, 255, 0.15); --ds-button-hover-color: #C3DAF8;">
                                                            <div class="ds-button__icon">
                                                                            <span
                                                                                style="transition: transform 0.4s ease-out; transform: rotate(0deg);">
                                                                                <div class="ds-icon"
                                                                                     style="font-size: 19px; width: 19px; height: 19px; color: #2442bf">
                                                                                    <img v-if="chatconfig.chatfile.name"
                                                                                         src="/assets/images/upfile-disicon.png">
                                                                                    <img v-else
                                                                                         src="/assets/images/upfile-icon.png">
                                                                                </div>
                                                                            </span>
                                                            </div>
                                                            <span class="ad0c98fd">文件</span>
                                                        </div>
                                                    </template>
                                                </chatupload>
                                                <chatupload v-if="chatconfig.appfunIds.includes(13)" :data="{chatkey:sendinfo.chatkey,app_id:sendinfo.appid,'driver':'local'}"
                                                            @success="chatFileSusccess"
                                                            @change="onElChange('image',$event)"
                                                            type="image">
                                                    <template #default>
                                                        <div role="button"
                                                             :class="chatconfig.chatfile.name?'chatup-button-dis':''"
                                                             class="chatup-button ds-button ds-button--primary ds-button--filled ds-button--rect ds-button--m d9f56c96"
                                                             tabindex="1"
                                                             style="--ds-button-color: #fff; --button-text-color: #4c4c4c; --button-border-color: rgba(0, 0, 0, 0.12); --ds-button-hover-color: #E0E4ED;">
                                                            <div class="ds-button__icon">
                                                                            <span
                                                                                style="transition: none; transform: rotate(0deg);">
                                                                                    <div class="ds-icon"
                                                                                         style="font-size: 17px; width: 17px; height: 17px; rgba(51,51,51,0.52)">
                                                                                        <img
                                                                                            v-if="chatconfig.chatfile.name"
                                                                                            src="@/assets/images/upimg-disicon.png">
                                                                                        <img v-else
                                                                                             src="@/assets/images/upimg-icon.png">
                                                                                    </div>
                                                                            </span>
                                                            </div>
                                                            <span class="ad0c98fd">图片</span>
                                                        </div>
                                                    </template>
                                                </chatupload>
                                                <div class="bf38813a" v-if="!sendLoading">
                                                    <el-button :disabled="sendinfo.question?false:true"
                                                               :loading="sendLoading" @click="sendQuestion"
                                                               class="chatsend-button f6d670"
                                                               :class="sendLoading?'bcc55ca1':''"> 发送
                                                    </el-button>
                                                    <el-button @click="handleNewChat"  :icon="Plus" class="chatsend-button f6d670 newchat-button" style="">新建会话
                                                    </el-button>
                                                </div>
                                                <div v-else class="bf38813a">
                                                    <div role="button" aria-disabled="false" class=" f6d670">
                                                        <div class="f286936b bf38813a">
                                                            <div class="be24146b"></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fcaa63f8" style="">内容由 AI 生成，请仔细甄别</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <LoginModel v-if="isMobileDevice===false&&showLogin"></LoginModel>
        <FeedbackModel/>
        <el-dialog
            v-model="state.changePwd"
            title="修改密码"
            style="width: 660px;"
        >
            <changePassword></changePassword>
        </el-dialog>
        <el-dialog
            v-model="state.avatarDialog"
            title="修改头像"
            style="width: 660px;"
        >
            <changeUserAvatar></changeUserAvatar>
        </el-dialog>
        <el-dialog
            v-model="chunkVisible"
            title="回答来源"
            :before-close="handleChunkClose"
        >
            <div>
                <el-table v-loading="chunkLoading" v-if="chunkLoading"></el-table>
                <div style="max-height: 800px;margin-bottom: 20px;overflow: auto;">
                    <div class="ds-markdown ds-markdown--block md-preview" v-html="md.render(sourfile.content)"></div>
                </div>
            </div>
            <template #footer>
                <el-button @click="chunkVisible = false" style="margin-right: 20px;    padding: 0 10px;">知道了
                </el-button>
                <a :href="sourfile.url?sourfile.url:'javascritp:;'" :target="sourfile.url?'_blank':'_self'">
                    <el-button type="primary" style="background: rgb(29, 107, 243);color: #fff;    padding: 0 10px;">
                        查看源文件
                    </el-button>
                </a>
            </template>
        </el-dialog>
        <div v-if="showEdit" class="ds-floating-position-wrapper ds-theme" data-transform-origin="bottom left"
             style="z-index: 1024;">
            <div class="ds-dropdown-menu ds-elevated" role="menu"
                 style="--ds-dropdown-menu-font-size: var(--ds-font-size-m); --ds-dropdown-menu-padding: 6px; --ds-dropdown-menu-option-padding: 8px 14px 8px 12px; --ds-dropdown-menu-option-line-height: var(--ds-line-height-m); --ds-dropdown-menu-option-icon-size: 20px; --ds-dropdown-menu-option-icon-margin: 0; --ds-dropdown-menu-option-label-margin: 0 10px;">
                <div class="ds-dropdown-menu-option ds-dropdown-menu-option--none">
                    <div class="ds-dropdown-menu-option__label">
                        {{ userInfo.nickname ? userInfo.nickname : '******' }}
                    </div>
                </div>
                <div style="background:rgb(226 226 226 / 40%);width: 212px;height: 1px;margin-top: 10px"></div>
                <div class="ds-dropdown-menu-option ds-dropdown-menu-option--none" v-if="userInfo.token"
                     @click="handleLogout">
                    <div class="ds-dropdown-menu-option__icon">
                        <div class="ds-icon" style="font-size: 24px; width: 24px; height: 24px;">
                            <div class="ds-icon" style="font-size: 24px; width: 24px; height: 24px;">
                                <img src="/assets/default_avatar.png">
                            </div>
                        </div>
                    </div>
                    <div class="ds-dropdown-menu-option__label">退出登录</div>
                </div>
                <div class="ds-dropdown-menu-option ds-dropdown-menu-option--none" v-else @click="showLoginHandle">
                    <div class="ds-dropdown-menu-option__icon">
                        <div class="ds-icon" style="font-size: 30px; width: 30px; height: 30px;">
                            <img src="/assets/defaultuv.png">
                        </div>
                    </div>
                    <div class="ds-dropdown-menu-option__label">登录</div>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup lang="ts">
import LoginModel from "@/components/loginModel.vue";
import Instructions from "~/pages/instructions.vue";
import FeedbackModel from "@/components/feedbackModel.vue";
import chatupload from '@/components/baInput/chatupload.vue'
import changePassword from '~/pages/user/account/changePassword.vue'
import changeUserAvatar from '~/pages/user/account/editinfo.vue'
import{copyText} from '~/utils/common'
import {DrawerProps, ElLoading} from 'element-plus';
import {
    Refresh,
    ChatDotSquare,
    Delete,
    Link, Loading,Plus
} from '@element-plus/icons-vue'
import {useSiteConfig} from '~/stores/siteConfig'
import {isMobile} from '~/utils/common'
import {useI18n} from 'vue-i18n'
import {reactive, toRefs, onMounted} from 'vue'
import type {TabsPaneContext} from 'element-plus'
import {ElMessage, ElMessageBox} from 'element-plus'
import MarkdownMate from '@/components/MarkdownMate.vue';
import {chatInfo} from '@/stores/chatinfo'
import {
    getchat,
    newchat,
    initchat,
    handleDialogue,
    handleAnswer,
    changeQues,
    faqView,
    editQuestion
} from '~/api/user/chatai'
import {useScroll} from '~/plugins/hooks/useScroll'
import {useRoute, useRouter} from 'vue-router'
import MarkdownIt from 'markdown-it'
import hljs from 'highlight.js'
import 'highlight.js/styles/atom-one-dark.css'

const showEdit = ref(false)
const {scrollRef, scrollToBottom, scrollToTop} = useScroll()
const router = useRouter(); // 这里获取 router

useSeoMeta({
    title: '会话',
})
definePageMeta({
    layout: false,
    name: 'user/chatai',
    noNeedLogin: true,
})
const inputpcFocus = shallowRef(null);
const inputmobFocus = shallowRef(null);

let md: any = new MarkdownIt({
    html: true,
    linkify: true,
    typographer: true,
    gfm: true,
    breaks: true, // Convert '\n' in paragraphs into <br>
    highlight: function (str: any, lang: any) {
        if (lang && hljs.getLanguage(lang)) {
            try {
                return `<pre><code class="language-${lang} hljs">` +
                    hljs.highlight(str, {language: lang, ignoreIllegals: true}).value +
                    '</code></pre>';
            } catch (__) {
            }
        }

        return '<pre><code class="language-none hljs">' + md.utils.escapeHtml(str) + '</code></pre>';
    }
})
const upTop = () => {
    scrollToTop()
}
const chatInfoObj = chatInfo()
const getCssVarName = (type: string) => {
    return `--el-box-shadow${type ? '-' : ''}${type}`
}
const setBaseinfo = () => {
    useRouter().push({'path': '/user/baseinfo'})
}
const avatarDialogHandle = () => {
    if (userInfo.token) {
        state.avatarDialog = true
    }
}
//修改头像
const editInfo = () => {

}
//换一换
const keysChange = () => {
    if (chatconfig.welcome.faq_len <= sendinfo.faq_num) {
        return false;
    }
    changeQues({
        page: chatInfoObj.$state.quePage + 1,
        appid: state.activeApprow.appid,
        limit: sendinfo.faq_num
    }).then(res => {
        chatconfig.welcome.content = res.data.data;
        if (res.data.current_page == res.data.last_page) {
            chatInfoObj.setquePage(0)
        } else {
            chatInfoObj.setquePage(res.data.current_page)
        }
    })
}
const load = () => {
    getchat({page: 1,appid:sendinfo.appid}).then((res) => {
        if (res.code == 1) {
            state.chattitles = res.data.data
            chatconfig.chatdialog=res.data.data
        }
    }).finally(() => {
        //state.pageLoading = false
    })
}
const chunkVisible = ref(false)
const handleChunkClose = () => {
    chunkVisible.value = false;
}
let sourfile = reactive({'url': '/'})
let chunkList = reactive([])
let chunkLoading = ref(false)
const viewSlice = async (sliceObj: any) => {
    chunkLoading.value = true
    sourfile = sliceObj;
    chunkVisible.value = true
    chunkList = []
    chunkLoading.value = false
    // await getSlice(sliceObj).then((res) => {
    //     chunkLoading.value = false
    //     if (res.code == 1) {
    //         chunkList = res.data
    //     }
    // })
}
const searchChat = () => {
    leftChatTitles()
}
const leftChatTitles = async () => {
    await getchat({page: 1, 'title': chatconfig.searchTitle}).then((res: any) => {
        if (res.code == 1) {
            chatconfig.chatdialog = res.data.data
        }
    }).finally(() => {

    })
}
const onElChange = (type: string, res: any) => {

}
const chatFileSusccess = (res: any) => {
    let temp_data = res.data
    chatconfig.chatfile = {
        name: temp_data.file.name,
        fullurl: temp_data.file.url,
        file_ids: temp_data.chat_file.id
    }
    sendinfo.chatkey=temp_data.chatkey
    chatInfoObj.dataFill({'chatkey': temp_data.chatkey});
    if (temp_data.chat_file.id) {
        sendinfo.file_ids = temp_data.chat_file.id
    } else {
        ElNotification({
            title: '错误提示',
            message: '文件上传失败',
            type: 'error',
        })
    }
}
const clearChatfile = () => {
    chatconfig.chatfile = {
        name: '',
        fullurl: '',
        file_ids: ''
    }
    sendinfo.file_ids = ''
}
//删除操作
const deleteTitle = (item: any) => {
    ElMessageBox.confirm(
        '确认要删除么?',
        '提示',
        {
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type: 'warning',
        }
    )
        .then(() => {
            DialogueSave({'action': 'delete', id: item.id})
            loadData(sendinfo)
        })
        .catch(() => {

        })
}
const DialogueSave = async (item: any) => {
    await handleDialogue(item).then((res) => {
        loadData(sendinfo)
    })
}
const editTitle = (item: any) => {
    ElMessageBox.prompt('请输入要修改的名称', '提示', {
        confirmButtonText: '保存',
        cancelButtonText: '取消',
        inputErrorMessage: '',
        inputValue: item.title,
    })
        .then(({value}) => {
            DialogueSave({'action': 'edit', id: item.id, title: value})
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: 'Input canceled',
            })
        })
}

function lineBreak() {
    const textarea = sendinfo.question.$el; //注意此处获取dom
    const start = textarea.selectionStart;
    const end = textarea.selectionEnd;
    const value = textarea.value;
    const newValue = value.substring(0, start) + "\n" + value.substring(end);
    textarea.value = newValue;
    textarea.selectionStart = textarea.selectionEnd = start + 1;
}

const writerStatus = ref(true)
const handleStopWriter = () => {
    writerStatus.value = true
    if (state.eventSourceObj) {
        state.eventSourceObj.close();
    }
}
const chating = ref(false)
const lastLoad = ref(false)
const loadOver = (item: any) => {
    lastLoad.value = item.status
    writerStatus.value = true
    chatconfig.chatList[chatconfig.chatList.length - 1]['editor'] = item.copytext
    setTimeout(() => {
        scrollToBottom()
    }, 100)
}
const modalName = ref(false)
const showModal = () => {
    modalName.value = true
    //

}

function decodeHtmlEntities(str: any) {
    if (str) {
        const txt = document.createElement('textarea');
        txt.innerHTML = str;
        // 第二次解码，处理 `&quot;` 转换为 `"`
        return txt.value.replace(/&quot;/g, '"');
        // return txt.value;
    } else {
        return str;
    }
}

const goLogin = () => {
    if (!userInfo.token) {
        useRouter().push({'path': '/login'})
    }
}
const handleClose = () => {
    modalName.value = false
}
const changePwdHandle = () => {
    state.changePwd = true
}

const DialogVisible = reactive({
    'feedbackDialog': false
})
const openFeedback = () => {
    window.open('http://gongdan.super-aiagent.com?uuid='+sendinfo.storeuuid);
    //DialogVisible.feedbackDialog = true
}
const goInstruct = () => {
    router.push({'path': '/instructions/' + sendinfo.storeuuid})
}
const helpCenter = () => {
    state.showIntro = !state.showIntro
    //router.push({'path':'/instructions'})
    // ElMessage({
    //     type: 'info',
    //     message: '开发中',
    // })
}

provide('DialogVisible', DialogVisible)

/**
 * 点评回答问题
 * */
const ReviewAnswer = (action: any, id: any) => {
    let newassignList = JSON.parse(JSON.stringify(chatconfig.chatList))
    let res_assign = <any>[]
    newassignList.forEach((item: any) => {
        if (item.id == id) {
            if (item.checkbox_arr.includes(action)) {
                let newcheck = [];
                item.checkbox_arr.forEach((chekit: any, cheke: any) => {
                    if (chekit != action) {
                        newcheck.push(chekit)
                    }
                })
                item.checkbox_arr = newcheck
            } else {
                item.checkbox_arr.push(action)
            }
        }
        res_assign.push(item)
    })
    chatconfig.chatList = res_assign
    handleAnswer({'action': action, 'id': id, 'storeuuid': sendinfo.storeuuid}).then(res => {
        return false;
    })
}
const showLogin = ref(false)
const copyHandle = (text: string, id: number) => {
    try {
        navigator.clipboard.writeText(text).then(res => {
            console.log('复制成功', res);
            copyText(text)
            ElMessage({
                message: '复制成功!',
                type: 'success',
            })
            ReviewAnswer('copy', id);
        }).catch(error => {
            ElMessage({
                message: '复制失败',
                type: 'error',
            })
        })
    } catch (e) {
        copyText(text)
        ElMessage({
            message: '复制成功',
            type: 'success',
        })
        ReviewAnswer('copy', id);
    }
};
// 重新生成
const Regenerate = (reflashStr: any, id: any) => {
    sendinfo.question = reflashStr
    sendLoading.value = false
    ReviewAnswer('repeat', id);
    sendQuestion({})
}
const route = useRoute()
const sendLoading = ref(false)
const sendinfo = reactive({
    'question': '',
    'chatkey': '',
    'storeuuid': '',
    'appid': '',
    'num': 0,
    visitor: '',
    file_ids: '',
    faq_num: 6
})
const showLoginHandle = () => {
    if(isMobileDevice.value == true){
        if (!userInfo.token) {
            router.push('/login')
        }
        return
    }
    let loginset = chatInfoObj.$state.loginset
    if (loginset == 1) {
        //白名称
        showEdit.value = !showEdit
        showLogin.value = true
        state.loginDialogConfig.showLogin = true;
        provide('loginDialogConfig', state.loginDialogConfig)
        return true
    }
    if (loginset == 2) {
        showEdit.value = !showEdit
        showLogin.value = true
        state.loginDialogConfig.showLogin = true;
        provide('loginDialogConfig', state.loginDialogConfig)
        return true
    }
    if (loginset == 3) {
        //免登陆
        return true
    }
}
const userAvatarHandle = () => {
    let loginset = chatInfoObj.$state.loginset
    if (loginset == 3) {
        return
    }
    if(!userInfo.token){
        return showLoginHandle()
    }
    showEdit.value = !showEdit.value
    return false
    if (userInfo.token) {
        if (loginset == 1) {
            //白名称

            provide('baTable', baTable)
            return true
        }
        if (loginset == 2) {
            //常规登录（账号密码）
            showLogin.value = true
            return true
        }
        if (loginset == 3) {
            //免登陆
            return true
        }
    } else {

    }
}
const userInfo = useUserInfo()
async function sendQuestion() {
    let hasData = false;          // 是否有数据返回
    let isFirstStream = false;    // 是否是第一个返回数据的流
    let chatapi = import.meta.env.VITE_API_BASE_URL;
    let sendkey = sendinfo.question.trim()
    if (!sendkey) {
        return true
    }
    chatInfoObj.setUsecount()
    chatconfig.chaterror = false;
    chatconfig.chatmsg = ''
    if (state.activeApprow.expiration_time * 1000 < (new Date()).getTime()) {
        chatconfig.chaterror = true;
        chatconfig.chatmsg = 'APP已过期，请续费'
        return
    }
    writerStatus.value = false
    chating.value = true
    setTimeout(function () {
        scrollToBottom()
    }, 100)
    if (sendLoading.value == true) {
        return false
    }
    chatconfig.chatList.push({
        'question': sendkey,
        'editor': sendkey,
        'content': sendkey,
        'type': 'question',
        'chattype': 'text'
    })
    let sentintro = {...sendinfo}
    sendinfo.question = ''
    sendLoading.value = true
    try {
        state.markdownText = '';
        const response = await fetch(chatapi + "/api/chatai/respond2", {
            method: 'POST', // 请求方法
            headers: { // 请求头
                "Content-type": "application/json; charset=utf-8",
                "Accept": "text/event-stream",
                'storeuuid': sendinfo.storeuuid,
                'visitor': sendinfo.visitor,
                'ba-user-token': userInfo.getToken(),
            },
            body: JSON.stringify({ // 请求头{server: 1,
                sentintro: sentintro,
                storeuuid: 'demo1'
            })
        });
        if (!response.ok) {
            chatconfig.chaterror = true;
            chatconfig.chatmsg = '服务器端未返回数据，请重试' + `HTTP error! Status: `
        }
        if (!response.body) {
            chatconfig.chaterror = true;
            chatconfig.chatmsg = '服务器端未返回数据，请重试'
            return;
        }
        let LastObj = {
            'question': sendkey,
            'answer': '',
            'editor': '',
            'type': 'answer',
            'id': '',
            'chatkey': sentintro.chatkey,
            'checkbox_arr': [],
            'code': 1,
            'msg': 'yes',
            'source': []
        }
        const reader = response.body.getReader();
        const decoder = new TextDecoder("utf-8");
        let buffer = "";
        let fullAnswer = "";
        let LastObjInserted = false; // **标记是否已插入 LastObj**
        state.mdLoading = true;
        while (true) {
            const {done, value} = await reader.read();
            if (done) {
                break;
            }
            buffer += decoder.decode(value, {stream: true});
            const lines = buffer.split("\n");
            buffer = lines.pop(); // 可能未完成，保留
            for (const line of lines) {
                if (line.startsWith("data:")) {
                    try {
                        const jsonData = JSON.parse(line.replace("data:", "").trim());
                        console.log('jsonData', jsonData);
                        // **错误处理：如果 code 不是 1，直接报错，不插入 chatList**
                        if (jsonData.code && jsonData.code != 1) {
                            chatconfig.chaterror = true;
                            sendLoading.value = false;
                            state.mdLoading = false;
                            chatconfig.chatmsg = jsonData.msg ? jsonData.msg : '服务器发送错误，请重试';
                            if (jsonData.code == 401) {
                                if (isMobileDevice.value == true) {
                                    setTimeout(() => {
                                        window.location.href = '/login';
                                    }, 2000);
                                } else {
                                    showLoginHandle();
                                }
                            }
                            return; // **发生错误，直接终止**
                        } else {
                            // **确保 LastObj 只插入一次**
                            if (!LastObjInserted) {
                                sendLoading.value = false
                                console.log(chatconfig.chatList, 'chatconfig.chatList');
                                chatconfig.chatList.push(LastObj);
                                LastObjInserted = true; // **标记已插入**
                            }
                        }
                        console.log(jsonData.answer,'答案')
                        if (jsonData.answer) {
                            fullAnswer += jsonData.answer; // **累积数据**
                            // **更新最后一条消息的 answer**
                            // 不再用fullAnswer，而是直接在已有answer基础上追加
                            chatconfig.chatList[chatconfig.chatList.length - 1].answer += jsonData.answer;
                            state.markdownText = fullAnswer;
                            // // 延迟触发状态更新，避免重置 Markdown 渲染
                            nextTick(() => {
                                //writerStatus.value = false
                                //chating.value = true
                                scrollToBottom();
                            });
                        }
                        if (jsonData.event === 'action') {
                            writerStatus.value = true
                            chatconfig.chatList[chatconfig.chatList.length - 1].id = jsonData.id;
                            chatconfig.chatList[chatconfig.chatList.length - 1].source = jsonData.source;
                            sendinfo.chatkey = jsonData.chatkey;
                            chatInfoObj.dataFill({'chatkey': jsonData.chatkey});
                            if(chatconfig.chatList.length<=2){
                                load()
                            }
                        }
                    } catch (error) {
                        console.error("解析 JSON 失败：", error);
                    }
                }
                setTimeout(() => {
                    scrollToBottom();
                }, 20);
            }
        }
    } catch (error) {
        sendinfo.question = ''
        sendLoading.value = false
        writerStatus.value = true
        throw new Error(`HTTP error! Status:1000 ${error}`);
    }
    sendinfo.question = ''
    sendLoading.value = false
    writerStatus.value = false
    state.mdLoading = false;
}

const questionClick = (recItem: any) => {
    sendinfo.question = recItem.describes
    //sendQuestion({})
    faqView(recItem)
    // nextTick(() => {
    //     inputpcFocus.value.focus();
    //     inputmobFocus.value.focus();
    // });
}
let chatconfig: {
    searchTitle: String,
    shop_logo: string
    welcome: {
        appid: number
        title: string
        content: [],
        faq_len: number,
        describe: string
    }
    chatkey: string
    chathis: [],
    chatdialog: [],
    is_login: boolean,
    applist: [],
    chatList: any,
    chaterror: boolean,
    chatmsg: string,
    chatfile: Object,
    appfunIds: [],
    technicalSupport: string,
} = reactive({
    searchTitle: '',
    shop_logo: '',
    welcome: {appid: 0, title: '', content: [], describe: '', faq_len: 0},
    chatkey: '',
    chathis: [],
    chatdialog: [],
    is_login: false,
    applist: [],
    chatList: [],
    chaterror: false,
    chatmsg: '',
    chatfile: {
        name: '',
        fullurl: '',
        file_ids: ''
    },
    appfunIds: [],
    pageloading: false,
    technicalSupport: '',
})
//初始化
const loadData = (params: any) => {
    state.pageloading = true
    initchat(params).then((res) => {
        state.pageloading = false
        if (res.code == 1) {
            let storeconfig = Object.assign({...params}, {
                'chatkey': res.data.chatkey,
                free_count: parseInt(res.data.free_count),
                loginset: parseInt(res.data.loginset),
                usecount: parseInt(res.data.usecount),
                visitor: res.data.visitor
            })
            if (userInfo.token=='') {
                state.defaultAvatar = res.data.default_avatar;
            }
            state.activeApprow = res.data.defaultApp
            state.activeAppname = res.data.defaultApp.title
            chatInfoObj.dataFill(storeconfig)
            chatconfig.welcome = <any>res.data.welcome
            chatconfig.shop_logo = <any>res.data.shop_logo
            chatconfig.chathis = <any>res.data.chathis
            chatconfig.chatList = <any>res.data.chathis
            chatconfig.chatdialog = <any>res.data.chatdialog
            chatconfig.is_login = <any>res.data.is_login
            chatconfig.applist = <any>res.data.applist
            chatconfig.appfunIds = <any>res.data.appfunIds
            chatconfig.technicalSupport = <any>res.data.technicalSupport
            activeName.value = res.data.welcome.appid
            sendinfo.appid = res.data.welcome.appid
            sendinfo.chatkey = res.data.chatkey
            sendinfo.visitor = res.data.visitor
            state.markdownText=res.data.chathis.length>0?res.data.chathis[res.data.chathis.length-1]['answer']:''
            // setTimeout(() => {
            //     scrollToBottom()
            // }, 200)
        } else {
            chatconfig.chathis = [];
            chatconfig.chatList = [];
            chatconfig.welcome.content = [];
            sendinfo.appid = ''
            sendinfo.chatkey = ''
        }
    })
}
//新建回话按钮
const handleNewChat = (type: any) => {

    sendinfo.chatkey =''
    chatconfig.chatList = []
    chatInfoObj.dataFill(sendinfo)
    loadData(sendinfo)
    // const {app_id,appid}=state.activeApprow
    // newchat({storeuuid: sendinfo.storeuuid,app_id,appid}).then((res) => {
    //     if (res.code == 1) {
    //         sendinfo.chatkey = res.data.chatkey
    //         chatconfig.chatList = []
    //         chatInfoObj.dataFill(sendinfo)
    //         loadData(sendinfo)
    //         // if (type == 'new') {
    //         //     chatconfig.chatList = []
    //         //     window.location.href = route.path + '?chatkey=' + sendinfo.chatkey
    //         // }
    //     }
    // })
}
const siteConfig = useSiteConfig()
const state = reactive({
    chattitles: [],
    changePwd: false,
    avatarDialog: false,
    activeAppname: '',
    activeApprow: {'image': "", 'name': '-', status: 0, expiration_time: ''},
    showIntro: false,
    loginDialogConfig: {showLogin: false, showRegister: false, showFindPwd: false},
    pageloading: true,
    eventSourceObj: null,
    mobshowmenu: false,
    popoverWith: 800,
    defaultAvatar:"/assets/default_avatar.png",
    markdownText: '',
    mdLoading: false,
    editingText:'',
    editingId:0
})
const upchatQuestion=(item:any)=>{
    state.editingText=item.question
    state.editingId=item.id
}
provide('instrutionsVisible', state)
const activeName = ref(0)
//切换模型
const appChange = (tab: TabsPaneContext, event: Event) => {
    if (state.mdLoading == true) {
        ElNotification({
            title: '提示',
            message: 'APP对话中，切换APP失败',
            type: 'error', duration: 3000,
        })
        return
    }
    if (tab.props) {
        sendinfo.appid = <any>tab.props.name
        state.activeAppname = <any>tab.props.name
        state.activeApprow = <any>tab.props
    } else {
        state.activeApprow = <any>tab
        sendinfo.appid = <any>tab.appid
        state.activeAppname = <any>tab.title
    }
    clearChatfile();
    sendLoading.value = false
    sendinfo.chatkey = ""
    chatconfig.chaterror = false;
    chatconfig.chatmsg = ''
    chating.value = false
    clearChatfile();
    loadData(sendinfo)
}
const isMobileDevice = ref(isMobile())
// 退出登录
const handleLogout = () => {
    sendinfo.chatkey = ""
    chatInfoObj.dataFill(sendinfo)
    userInfo.logout()
}
// 切换对话
const dropdownClick = (command: any) => {
    if (state.mdLoading == true) {
        ElNotification({
            title: '提示',
            message: 'APP对话中，切换APP失败',
            type: 'error', duration: 3000,
        })
        return
    }
    clearChatfile();
    sendinfo.appid = <any>command.applications_id
    sendLoading.value = false
    sendinfo.chatkey =command.chatkey
    chatconfig.chaterror = false;
    chatconfig.chatmsg = ''
    state.markdownText='';
    loadData(sendinfo)
}
const timer = ref(null);
provide('loginDialogConfig', state.loginDialogConfig)
const showMenu = () => {
    state.mobshowmenu = !state.mobshowmenu;
}
onMounted(() => {
    if (window.innerWidth >= 1728) {
        sendinfo.faq_num = 8
    } else {
        sendinfo.faq_num = 6
        state.popoverWith = 600
    }
    if (isMobileDevice.value) {
        state.popoverWith = 300
    }
    const temp_chatkey = chatInfoObj.getChatKey()
    sendinfo.storeuuid = <any>useRoute().params.storeuuid
    sendinfo.chatkey = <any>useRoute().query.chatkey ? <any>useRoute().query.chatkey : temp_chatkey
    sendinfo.visitor = chatInfoObj.$state.visitor
    chatInfoObj.dataFill(sendinfo)
    loadData(sendinfo)
})

const editTitleSave =(chatItem:any)=>{
    editQuestion({'question':state.editingText,'id':state.editingId}).finally(()=>{
        state.editingText=''
        state.editingId=0
        loadData(sendinfo)
    })
}
</script>
<style lang="scss" scoped>
.chatinput{
    :deep(.el-input__wrapper){
        border-radius: 15px;
    }
}
:deep(.chat-column-popover){
    width: 82px;
    min-width: 82px !important;
    .el-popover.el-popper{
        min-width: 82px !important;
    }
}
:deep(code.hljs){
    color: #b6b6b6;
}
.chat-column-menu{
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    width: 65px;
    cursor: pointer;
    justify-content: space-between;
}
.chat-title-edit{
    &:hover{
        color: #2442bf;
    }
}
.chat-title-delete{
    &:hover{
        color: red;
    }
}
:deep(.el-dialog) {
    border-radis: 20px;
}

.chatai-container {
    //background-image: url('~/assets/chatbg.jpg');
    //background-repeat: no-repeat;
    //background-size: 100% 100%;

    .c3ecdb44 {
        background: rgb(255 255 255 / 98%);
    }

    .f2eea526 {
        background: rgba(36, 66, 191, 0.02);
    }
}

body.change-theme * {
    transition: none !important;
}

body.change-theme *::before {
    transition: none !important;
}

body.change-theme *::after {
    transition: none !important;
}

#_copy {
    align-items: center;
    background: #4494d5;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    height: 30px;
    justify-content: center;
    position: absolute;
    width: 60px;
    z-index: 1000
}

#select-tooltip, #sfModal, .modal-backdrop, div[id^=reader-helper] {
    display: none !important
}

.modal-open {
    overflow: auto !important
}

._sf_adjust_body {
    padding-right: 0 !important
}

.enable_copy_btns_div {
    position: fixed;
    width: 154px;
    left: 10px;
    top: 45%;
    background: #e7f1ff;
    border: 2px solid #4595d5;
    font-weight: 600;
    border-radius: 2px;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
    z-index: 5000
}

.enable_copy_btns_logo {
    width: 100%;
    background: #4595d5;
    text-align: center;
    font-size: 12px;
    color: #e7f1ff;
    line-height: 30px;
    height: 30px
}

.enable_copy_btns_btn {
    display: block;
    width: 128px;
    height: 28px;
    background: #7f5711;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    border: 0;
    outline: 0;
    margin: 8px auto;
    font-weight: 700;
    cursor: pointer;
    opacity: .9
}

.enable_copy_btns_btn:hover {
    opacity: .8
}

.enable_copy_btns_btn:active {
    opacity: 1
}

.dc04ec1d {
    background-image: url('~/assets/images/40.png?v=3344');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 265px;
    z-index: 20;
    flex-shrink: 0;

    .a2f3d50e {
        width: 265px;
        background: rgba(36, 66, 191, 0.1);
    }

    .f9edaa3c {
        padding: 0;

        .c08e6e93 {
            width: 220px;
            height: 45px;
            border-radius: 62px;
            padding: 0 17px;
        }

    }
}

.b64fb9ae {
    .c08e6e93 {
        background: rgba(36, 66, 191, 0.02);
    }
}

.ec4f5d61 {
    .chatup-button {
        width: 92px;
        height: 33px;
        border-radius: 24px;
        font-size: 14px;
        font-weight: normal;
        background: rgba(36, 66, 191, 0.15);
        border: none;
        font-family: '苹方 中等', '苹方', sans-serif, '苹方 中等', '苹方', sans-serif-400;

        .ad0c98fd {
            color: rgba(36, 66, 191);
        }
    }

    .chatup-button-dis {
        background: rgba(215, 215, 215, 0.64);

        .ad0c98fd {
            color: rgba(51, 51, 51, 0.84);
        }
    }
}

.cefa5c26 {
    .dd442025 {
        background-color: rgba(36, 66, 191, 0.05);
    }
}

.chatsend-button {
    width: 76px;
    height: 33px;
    background: #2442bf;
    border-radius: 73px;
    font-size: 16px;
    font-weight: normal;
    color: #ffffff;
}

.recommend-parts {
    .rec-title {
        display: flex;
        margin-bottom: 10px;
        align-items: center;

        .title-info {
            display: flex;
            font-size: 15px;
            align-items: center;

            &:disabled {
                cursor: not-allowed;
            }

        }

        .change-faqbtn {
            cursor: pointer;
            color: rgb(6, 107, 247);
            border: 1px solid rgb(6, 107, 247);
            padding: 10px 6px;
            border-radius: 20px;
            font-size: 15px;
            margin-left: 20px;
            height: 21px;
        }
    }

    .rec-content {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: flex-start;

        .content-info {
            cursor: pointer;
            border-radius: 22px;
            padding: 10px 20px;
            width: 270px;
            height: 65px;
            background: rgba(36, 66, 191, 0.07);
            border-radius: 10px;

            .quest-title, h3 {
                font-size: 15px;
                color: #2442bf;
                margin-bottom: 0;
                width: 140px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                line-height: 18px;
                margin: 0px;

                .down-file {
                    display: block;
                    top: -3px;
                    right: 0;
                    text-align: right;
                    float: right;
                }
            }

            .quest-desc, p {
                font-size: 15px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
        }
    }

}

.upfile-res {
    height: 33px;
    background: rgba(36, 66, 191, 0.00);
    border-radius: 24px;
    font-size: 14px;
    font-family: '苹方 中等', '苹方', sans-serif, '苹方 中等', '苹方', sans-serif-400;
    font-weight: normal;
    text-align: left;
    color: #2442bf;
    display: flex;
    align-items: center;
    max-width: var(--message-list-max-width);
    flex-grow: 1;
    width: 100%;
    position: relative;
    margin-left: 14px;
}

.free-tips {
    font-size: 13px;
    font-family: '苹方 中等', '苹方', sans-serif, '苹方 中等', '苹方', sans-serif-400;
    font-weight: normal;
    color: #7f7f7f;
}

.answer-source {
    font-size: 15px;
    font-family: '苹方 中等', '苹方', sans-serif, '苹方 中等', '苹方', sans-serif-400;
    font-weight: normal;
    color: #2442bf;
    margin: 15px 0;

    .answer-title {
        font-size: 15px;
        color: #2442bf;
    }

    .source-file {
        background: rgba(36, 66, 191, 0.07);
        border-radius: 5px;
        font-size: 15px;
        margin-right: 20px;
        cursor: pointer;
        display: inline-block;
        padding: 5px 10px;

        &:hover {
            background: rgba(36, 66, 191, 1);
            color: #fff;
        }
    }
}

.think-loading {
    background: rgba(36, 66, 191, 0.07);
    border-radius: 5px;
    font-size: 15px;
    font-family: '苹方 中等', '苹方', sans-serif, '苹方 中等', '苹方', sans-serif-400;
    font-weight: normal;
    color: #2442bf;
}

.think-error {
    background: rgba(36, 66, 191, 0.07);
    border-radius: 15px;
    font-size: 15px;
    font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif, '苹方 粗体', '苹方 中等', '苹方', sans-serif-700;
    font-weight: bold;
    text-align: left;
    color: #d03600;
    padding: 10px 20px;
    height: 40px;
}

@media screen and (min-width: 750px) and (max-width: 1550px) {
    .f6004764 {
        padding: 0 120px 120px
    }
}


._03210fb {
    flex: 1;
    padding: 0 10px;
    position: relative;
    overflow: auto
}

._03210fb.f27d1011 {
    justify-content: center;
    align-items: center;
    display: flex
}

._48cdfc1 {
    z-index: 2;
    color: #555;
    background-color: rgb(231, 234, 246);
    margin: 6px 0 6px 0px;
    padding: 0 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    position: -webkit-sticky;
    position: sticky;
    top: 0
}

._5d4b535 {
    position: relative;
    border-top: 1px solid #d7d7d7;
    padding-top: 10px;
}

._5d4b535:first-child ._48cdfc1 {
    margin-top: 0
}


.f27d1011 {
    color: rgb(var(--ds-rgb-label-2));
    font-size: 14px;
    line-height: 20px
}

.de3d058c {
    opacity: 0;
    width: 100%;
    height: 5px;
    margin-top: -30px
}

._873c4d4 {
    color: rgb(var(--ds-rgb-primary));
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 38px;
    font-size: 16px;
    display: flex
}

._47ef3ad {
    color: rgb(var(--ds-rgb-label-2));
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 1rem;
    padding: 0 20px;
    font-size: 14px;
    line-height: 20px;
    display: flex
}

.ede76300 {
    height: 100%
}

._196bcac {
    opacity: 0;
    z-index: 100;
    pointer-events: none;
    padding: 6px 10px;
    transition: all .15s ease-in-out;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0
}

._196bcac._8a693f3 {
    opacity: 1
}

._5c2e5a9, ._68953bc {
    box-sizing: border-box;
    height: 38px;
    padding-bottom: 8px
}

._68953bc:first-child {
    height: 24px
}

._68953bc:first-child ._5c2e5a9 {
    width: 28%;
    margin-left: 2.5%
}

._5c2e5a9 {
    width: 95%;
    height: 100%;
    margin: 0 auto
}

._5c2e5a9.ds-skeleton {
    --color-start: rgba(0, 0, 0, .04);
    --color-end: rgba(0, 0, 0, .06)
}

[data-ds-dark-theme] ._5c2e5a9.ds-skeleton {
    --color-start: rgba(255, 255, 255, .06);
    --color-end: rgba(255, 255, 255, .08)
}

._77cdc67 {
    opacity: 0;
    transition: all .15s ease-in-out
}

._77cdc67._8a693f3 {
    opacity: 1
}

._6969ec9 {
    box-sizing: border-box;
    cursor: pointer;
    flex-shrink: 0;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 56px;
    padding: 0 10px;
    display: flex
}

@media (min-width: 640px) {
    ._6969ec9 {
        height: 90px;
        padding: 25px 10px 34px 20px
    }
}

.e066abb8 {
    align-items: center;
    display: flex
}

.e066abb8 svg {
    color: #2c2c36;
    height: 22px
}

@media (min-width: 640px) {
    .e066abb8 svg {
        height: 26px
    }
}

.a5967822 {
    flex-grow: 0;
    flex-shrink: 0;
    width: 24px;
    height: 24px
}

@media (min-width: 640px) {
    .a5967822 {
        display: none
    }
}

._8a9564e {
    color: #8b8b8b;
    display: block
}

@media (min-width: 640px) {
    ._8a9564e {
        display: none
    }
}

._7d1f5e2 {
    display: none
}

._7d1f5e2.ds-icon-button:hover:before {
    background-color: var(--dsr-side-icon-hover)
}

@media (min-width: 640px) {
    ._7d1f5e2 {
        display: flex
    }
}

[data-ds-dark-theme] ._8a9564e {
    color: #cdd4df
}

[data-ds-dark-theme] .e066abb8 svg {
    color: #abb2bd
}

._50fd23d {
    background-color: var(--local-button-text);
    width: 1px;
    height: 20px
}

._2508e0d {
    align-items: center;
    height: 100%;
    padding: 0 10px;
    display: flex
}

._2508e0d:hover {
    background-color: var(--local-button-hover)
}

._7d38c36 {
    align-items: center;
    display: flex
}

.faf1228f {
    margin-right: 8px
}

.fdf5dad2 {
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    color: var(---dsr-text-1);
    font-size: 14px;
    line-height: 20px;
    display: block;
    overflow: hidden
}

._8ad5d9e {
    align-items: center;
    display: flex
}

._8ad5d9e ._1162494 {
    color: var(--dsr-icon-fg-1);
    margin-left: auto
}

[data-ds-dark-theme] ._5a8ac7a {
    --local-button: var(--dsr-main);
    --local-button-hover: #4166d5;
    --local-button-text: rgb(var(--ds-rgb-slate-50))
}

._5a8ac7a {
    --local-button: rgb(var(--ds-rgb-blue-100));
    --local-button-text: var(--dsr-main);
    --local-button-hover: #c6dcf8;
    color: var(--local-button-text);
    background-color: var(--local-button);
    cursor: pointer;
    width: -moz-fit-content;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
    align-items: center;
    width: fit-content;
    margin: 0 2px 0 14px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    display: flex;
    overflow: hidden
}

._5a8ac7a .c7dddcde {
    align-items: center;
    height: 100%;
    padding: 0 10px;
    display: flex
}

._5a8ac7a .c7dddcde:hover {
    background-color: var(--local-button-hover)
}

._1c42ad7 {
    margin-right: 9px;
    display: flex
}

._1c42ad7 svg {
    width: 22px;
    height: 22px
}

.ede5bc47 {
    cursor: pointer;
    width: 32px;
    height: 32px;
    height: -moz-fit-content;
    border-radius: 50%;
    outline: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: fit-content;
    display: flex;
    overflow: hidden
}

._725f8ba {
    color: var(--dsr-text-4)
}

.c6ab9234 {
    cursor: pointer;
    box-sizing: border-box;
    border-radius: 12px;
    align-items: center;
    width: 100%;
    padding: 8px;
    display: flex
}

.c6ab9234:hover {
    background-color: var(--dsr-side-hover-bg)
}

._7d65532 {
    color: var(--dsr-text-2);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin-left: 8px;
    font-size: 14px
}

.fdf01f38 {
    -o-object-fit: cover;
    object-fit: cover;
    border: 1px solid var(--dsr-border-2);
    box-sizing: border-box;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    min-height: 32px
}

._93cf5ec {
    font-size: var(--ds-font-size-m);
    height: var(--ds-input-height-m);
    align-items: center;
    gap: 4px;
    display: flex
}

._44a68f4 {
    height: var(--ds-input-height-m);
    padding: 4px
}

.ebd4cd9a {
    flex-direction: column;
    flex: 1 0 0;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    padding-right: 48px;
    display: flex
}

._663bc35 {
    justify-content: flex-end;
    align-items: center;
    width: 80px;
    display: flex
}

._0d00f26 {
    color: var(--dsr-text-3, #a3a3a3);
    font-size: 12px;
    line-height: 150%
}

._83421f9 {
    --dsr-side-bg-rgb: 249, 251, 255;
    --dsr-local-active-bg-rgb: 219, 234, 254;
    --dsr-local-active-bg: rgb(var(--ds-rgb-blue-100))
}

[data-ds-dark-theme] ._83421f9 {
    --dsr-side-bg-rgb: 33, 35, 39;
    --dsr-local-active-bg-rgb: 73, 73, 73;
    --dsr-local-active-bg: rgb(var(--ds-rgb-neutral-650))
}

._83421f9 {
    height: 38px;
    color: var(--dsr-text-1);
    //background-color: var(--dsr-side-bg);
    cursor: pointer;
    --ds-focus-ring-border-radius: 14px;
    border-radius: 12px;
    align-items: center;
    padding: 0 10px;
    font-size: 14px;
    display: flex;
    position: relative;
}

._83421f9:focus, ._83421f9._0e9c629 {
    outline: none
}

._83421f9:focus ._2090548, ._83421f9._0e9c629 ._2090548 {
    opacity: 1
}
._83421f9.b64fb9ae {
    background-color: var(--dsr-local-active-bg)
}
._83421f9 .c08e6e93 {
    white-space: nowrap;
    flex: 1;
    align-items: center;
    min-width: 0;
    line-height: 18px;
    display: flex;
    overflow: hidden
}

._83421f9 .c08e6e93 ._823060e {
    margin-right: 6px
}

._83421f9 ._2090548 {
    opacity: 0;
    z-index: 1;
    --ds-focus-ring-border-radius: 8px;
    border-radius: 8px;
    outline: none;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    display: flex;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%)
}

._83421f9 ._2090548:hover {
    opacity: 1;
    background-color: var(--dsr-side-bg)
}

._83421f9 .eaaaba55 {
    background: linear-gradient(90deg, rgba(var(--dsr-side-bg-rgb), 0) 0%, var(--dsr-side-bg) 100%)
}

._83421f9.b64fb9ae {
    background-color: rgba(255,255,255,1)
}

._83421f9.b64fb9ae .eaaaba55 {
    background-image: linear-gradient(to right, rgba(var(--dsr-local-active-bg-rgb), 0), var(--dsr-local-active-bg) 50%)
}

._83421f9:not(.b64fb9ae):hover {
    background-color: rgba(255,255,255,1);
}
._83421f9-active:not(.b64fb9ae){
    background-color: rgba(255,255,255,1);
}
._83421f9-active:not(.b64fb9ae) .eaaaba55 {
    background: linear-gradient(90deg, rgba(var(--dsr-side-hover-bg-rgb), 0) 0%, var(--dsr-side-hover-bg) 60%, var(--dsr-side-hover-bg) 100%);
    opacity: 1
}
._83421f9:not(.b64fb9ae):hover .eaaaba55 {
    background: linear-gradient(90deg, rgba(var(--dsr-side-hover-bg-rgb), 0) 0%, var(--dsr-side-hover-bg) 60%, var(--dsr-side-hover-bg) 100%);
    opacity: 1
}

._83421f9 ._2f87737, ._83421f9 .eaaaba55 {
    content: "";
    pointer-events: none;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0
}

._83421f9 ._2f87737 {
    background: linear-gradient(90deg, rgba(231, 233, 246, 0) 0%, #e7eaf6 50%, #e7eaf6 100%);
    width: 24px
}

._83421f9 .eaaaba55 {
    opacity: 0;
    width: 84px
}

._83421f9.b64fb9ae ._2090548, ._83421f9:hover ._2090548, ._83421f9.b64fb9ae .eaaaba55, ._83421f9:hover .eaaaba55 {
    opacity: 1;
}

@media (hover: none) {
    ._83421f9 .eaaaba55 {
        opacity: 1
    }

    ._83421f9 ._2090548 {
        opacity: .5
    }

    ._83421f9 ._2f87737 {
        width: 52px
    }
}


/*草错记录*/
.ds-dropdown-menu {
    --ds-dropdown-menu-font-size: var(--ds-font-size-m);
    --ds-dropdown-menu-option-icon-size: calc(var(--ds-font-size-m) + 4px);
    --ds-dropdown-menu-option-icon-margin: 0 10px 0 0;
    --ds-dropdown-menu-option-icon-color: rgb(var(--ds-rgb-label-2));
    --ds-dropdown-menu-color: rgb(var(--ds-rgb-elevated));
    --ds-dropdown-menu-option-text-color: rgb(var(--ds-rgb-label-1));
    --ds-dropdown-menu-option-height: 28px;
    --ds-dropdown-menu-option-color-hover: rgb(var(--ds-rgb-hover));
    --ds-dropdown-menu-padding: 4px;
    --ds-dropdown-menu-option-padding: 8px 14px;
    --ds-dropdown-menu-option-line-height: var(--ds-line-height-m);
    --ds-dropdown-menu-border-radius: 10px;
    --ds-dropdown-menu-option-border-radius: 8px;
    --ds-dropdown-menu-option-divider-margin: 8px;
    --ds-dropdown-menu-option-label-margin: 0
}

.ds-dropdown-menu-option.ds-dropdown-menu-option--error {
    --ds-dropdown-menu-option-text-color: rgb(var(--ds-rgb-error));
    --ds-dropdown-menu-option-icon-color: rgb(var(--ds-rgb-error));
    --ds-dropdown-menu-option-color-hover: var(--ds-dropdown-menu-option-error-color-hover,rgba(var(--ds-rgb-error)/.06))
}

.ds-dropdown-menu {
    border-radius: var(--ds-dropdown-menu-border-radius);
    background-color: var(--ds-dropdown-menu-color);
    padding: var(--ds-dropdown-menu-padding);
    color: var(--ds-dropdown-menu-option-text-color);
    box-shadow: 0 8px 24px rgba(0,0,0,.12)
}

.ds-dropdown-menu-option {
    font-size: var(--ds-dropdown-menu-font-size);
    line-height: var(--ds-dropdown-menu-option-line-height);
    border-radius: var(--ds-dropdown-menu-option-border-radius);
    min-height: var(--ds-dropdown-menu-option-height);
    padding: var(--ds-dropdown-menu-option-padding);
    color: var(--ds-dropdown-menu-option-text-color);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color var(--ds-transition-duration)var(--ds-ease-in-out),color var(--ds-transition-duration)var(--ds-ease-in-out);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    align-items: center;
    display: flex;
    overflow: auto
}

.ds-dropdown-menu-option:hover,.ds-dropdown-menu-option.ds-dropdown-menu-option--pending {
    background-color: var(--ds-dropdown-menu-option-color-hover)
}

.ds-dropdown-menu-option .ds-dropdown-menu-option__icon {
    color: var(--ds-dropdown-menu-option-icon-color);
    margin: var(--ds-dropdown-menu-option-icon-margin);
    font-size: var(--ds-dropdown-menu-option-icon-size);
    display: flex
}

.ds-dropdown-menu-option .ds-dropdown-menu-option__label {
    margin: var(--ds-dropdown-menu-option-label-margin)
}

.ds-dropdown-menu-option-divider {
    border-color: rgb(var(--ds-rgb-separator));
    margin: var(--ds-dropdown-menu-option-divider-margin);
    border-style: solid;
    border-width: 1px 0 0;
    min-height: 0;
    padding: 0;
    overflow: hidden
}
.newchat-button{
    display: flex;
    flex-direction: row;
    width:113px;
}
._4cbcd96 {
    transition: opacity var(--ds-transition-duration-slow) var(--ds-ease-in-out);
    opacity: 1;
    z-index: 8;
    background-color: rgba(0, 0, 0, .4);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
._7d10bb1 {
    opacity: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}
.scrollable {
    scrollbar-gutter: stable;
    scrollbar-color: var(--scroll-color) transparent;
    transition: scrollbar-color .1s ease-out;
}
@media screen and (max-width: 750px) {
    .ec4f5d61 {
        .chatup-button {
            width: 60px;
        }
    }
    .newchat-button{
        width: 100px;
    }
}
.md-preview{
    :deep(img){
      display: none;
    }
}
</style>
